How to change the hostname in Linux

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
Facebook Comments

More Stuff

How to Create a Shared Directory for All Users in Linux As a system administrator, you may have a certain directory that you want to give read/write access to every user on a Linux server. In this guide, we...
Another ICO Bites the Dust. Tomahawk Is Just the Beginning. After much deliberation, the SEC handed over a permanent ban for selling securities to David T. Laurance, who tried to raise money through an ICO for ...
Installing LEMP (Linux, Nginx, MariaDB and PHP) on Fedora 22 LEMP is a suit of tools similar to the more popular one LAMP. LEMP includes one of the most famous packages available for building websites. Its acron...
Faraday Future CEO’s long trail of debt is finally catching up to ... Jia Yueting, the CEO and a co-founder of troubled EV startup Faraday Future, has a notorious history with money. While his rise to fame and fortune in...
Spread the love

Posted by News Monkey