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    

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

Leave a Reply