Software >> OS >> Unix >> Linux >> How to change your machine hostname

RedHat 6.0/6.1 1. change entry in /etc/HOSTNAME 2. change entry in /etc/hosts 3. the host name is set at boot time in /etc/rc.d/rc.M by /bin/hostname `cat /etc/HOSTNAME | cut -f1 -d .` RedHat 7.0 1. Change HOSTNAME entry in /etc/network 2. change ip to host mapping in /etc/hosts RedHat 7.2 1. Change HOSTNAME entry in /etc/sysconfig/network 2. change ip to host mapping in /etc/hosts RedHat Enterprise Linux 6.x 1. change hostname value in /etc/sysconfig/network 2l change the ip to host mapping in /etc/hosts