Go4Expert (http://www.go4expert.com/)
-   Linux (http://www.go4expert.com/articles/linux/)
-   -   Changing the hostname of a Linux machine (http://www.go4expert.com/articles/changing-hostname-linux-machine-t944/)

pradeep 28Jun2006 14:33

Changing the hostname of a Linux machine
This can be achieved in three steps.

1) Issue the command :

root@srv# hostname new.host.name

2) Change the network configuration file /etc/sysconfig/network to include the line :


3) Restart the systems which relied on the hostname (or reboot):

root@srv# service network restart

Restart desktop

Bring down system to console mode :

root@srv# init 3

ii) Bring up X Windows:

root@srv# init 5

One may also want to check the file /etc/hosts for an entry using the system name which allows the system to be self aware.

All times are GMT +5.5. The time now is 05:24.