Tuesday, 23 September 2014

to change hostname in Linux

TO change the hostname in Linux operating systems

type:-- vi /etc/sysconfig/network 

Output will be something like this:--

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=localhost.localdomain


Now change the hostname to  something.anydomain.com and reboot the system.

once the system comes up type

# hostname
something.anydomain.com