Set hostname (FQDN & short name) in CentOS 6.x

To update system short name. Edit /etc/sysconfig/network and update the HOSTNAME field to the desired short-name.


To update the systems fully qualified domain name. Edit /etc/hosts and insert a new entry following the notation of (host_ip // FQDN // short-name).
In our example:

  • host_ip = (Yours will be different)
  • FQDN = node1.mydomain.local
  • short-name node1 node1.mydomain.local node1

Leave a Reply

Your email address will not be published. Required fields are marked *