linux poison RSS
linux poison Email

How to change hostname in Linux

1) Edit file /etc/sysconfig/network using your favourite editor.
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=abc.com)

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

Done! You have just changed your hostname in Linux platform



2 comments:

Unknown said...

How to set hostname in linux

DevOps said...

To set the hostname, you just have to add the following line at the end of the file "/etc/sysconfig/network"

HOSTNAME=xxxxxx

Post a Comment

Related Posts with Thumbnails