How to change the hostname in Linux

Posted on 16. Jul, 2011 by in Linux Tutorials, Techno Babble

If you are new to linux you probably will wonder how to change the hostname of your computer or server. (A hostname is the unique name by which a network attached device is known on a network.) If you enter the wrong hostname during the installation, and you need to change the hostname, here is the solution:-

 

  • Edit file /etc/sysconfig/network using your favourite editor. In my case is nano. So i’ll enter  nano /etc/sysconfig/network
  • Look for HOSTNAME=xxxxxx
  • Change the xxxx to the name you wish to set for your computer. (ex: HOSTNAME=wiredgorilla.com)
  • Save the file and restart the xinetd service. (ex: type service xinetd restart in your shell)
  • Done! You have just changed your hostname in Linux platform
VN:F [1.9.16_1159]
Rating: 0.0/10 (0 votes cast)

Related posts:

  1. Disable Telnet Access
  2. Disable Telnet Access
  3. Changing the DATE and TIME on your LINUX server
  4. Force the use of SSH protocol 2
  5. How to change your server signature

Comments are closed.