change host name in linux

by Ramya 2010-02-04 12:50:41

change host name in linux:

To know your current hostname, type the following command in terminal,
hostname


It will result you your current hostname as for eg,
localhost.localdomain

To change host name in linux,
* Login as root.
* Open the file /etc/sysconfig/network
* Look for HOSTNAME=......
* Change the hostname as per your wish(ex: HOSTNAME=hscripts.com)

Save the file and restart the xinetd service. (ex: type service xinetd restart in your shell)

Tagged in:

985
like
0
dislike
0
mail
flag

You must LOGIN to add comments