How to change your hostname and domain name in Linux

To change your hostname and/or domain name in Linux you need to modify two files.

/etc/sysconfig/network should read:
NETWORKING=yes
HOSTNAME=

– and –

/etc/hosts
127.0.0.1 localhost locahost.localdomain

Replace the terms in brackets (<>) with your own hostname and domainname, and then reboot.

Post to Twitter


Leave a Reply