Sunday, February 7, 2010

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.

To define hostname,
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:

0 comments:

Post a Comment

Recent Comments

About This Blog

Blog Archive

  © Blogger template Webnolia by Ourblogtemplates.com 2009

Back to TOP