Friday, May 6, 2011

How to change hostname in Linux

1)   Edit file /etc/sysconfig/network using your favourite editor. In my case is VI. So i'll enter  #vi /etc/sysconfig/network

2)   Look for HOSTNAME=xxxxxx

3)   Change the xxxx to the name you wish to set for your computer. (ex: HOSTNAME=abcd.yourdomain.com)

4)   Save the file and restart the xinetd service. Type  #service xinetd restart

5)   Done! You have just changed your hostname in Linux platform


No comments: