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    

Advertisement

About Mariami Kupatadze
Oracle Certified Master Linkedin: https://www.linkedin.com/in/mariami-kupatadze-01074722/

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 )

Facebook photo

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

Connecting to %s

%d bloggers like this: