Setting or Changing hostname of a CentOS host

How to set or change your host name in CentOS Open the file /etc/sysconfig/network using your favorite editor,  I like nano. [root@yourServer~]# sudo nano -w /etc/sysconfig/network The file will look something like this: NETWORKING=”yes” GATEWAY=”10.0.5.1″ HOSTNAME=”yourServer” To change the hostname, you need to edit the HOSTNAME value. For an example if you wanted your hostname to be yourserver01.example.com you would set […]