Jan 27, 2011 09:29
3 steps:
1. Linux Distribution specific file. Edit appropriate file as per your distribution as follows.
Redhat / CentOS / Fedora
sudo vim /etc/sysconfig/network
Debian / Ubuntu
sudo vim /etc/hostname
Slackware / Suse / OpenSuse
sudo vim /etc/HOSTNAME
2. Type the following command:
sudo hostname _NEW_NAME_
3. Update /etc/hosts
change hostname on linix