How to define hostname in Solaris

Hostname is assigning a user defined name to a computer. When the computer is connected to the network, other devices in the network can easily identify and communicate with the computer using the hostname.

How to define hostname in  Solaris

STEP 1:  Login as root user

STEP 2:  Open the /etc/hosts file and add the ip address of the machine followed by hostname. Multiple host names can be added for the same ip.

Example:
$ ping 25.26.27.28
25.26.27.28 is alive

$ su – root

$ vi /etc/hosts
 # Add the ip follwed by hostname(s)
25.26.27.28      www.techpages.org      TechPages      localhost

STEP 3:  Test if the hostname works

Example:
$ ping www.techpages.org
www.techpages.org is alive

$ ssh  user@Techpages
password:

Also Read  How to Plumb an IPV6 Interface in Solaris

About mohan

This is Mohan Jayapalan author of TechPages Blog.I am a part time blogger and Currently working for private Software Concern.

© Copyright 2010-2016 www.techpages.org · All Rights Reserved · Powered by WordPress ·