How do I change my IP address and hostname in Linux?
Answer
How to change the hostname in RHEL/CentOS based Linux distributions
Answer
How to change the hostname in RHEL/CentOS based Linux distributions
- Edit the /etc/sysconfig/network file with your favourite text editor. …
- Edit the /etc/hosts file so that the local hostname will resolve to the localhost IP address. …
- Run the ‘hostname name’ command, replacing name with your new hostname.