Change Hostname in Linux(Red Hat)

1. Change the value of the HOSTNAME parameter to the new hostname:

# vi /etc/sysconfig/network

HOSTNAME=newhostname

2.  Edit hosts file:

# vi /etc/hosts

192.168.1.100    newhostname     newhostname.sa.ge

3. Reboot the system.

4. Check that the new hostname is set:

# hostname

newhostname    

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: