How to Change the Host name on Linux


There ar times you will return up with a desire for modification in your computer’s identity over network. this is often once you can need to modification the Hostname of your pc. The hostname is just about sort of a label to your pc or the device for identification over the network. The hostname is simply a straightforward name, Associate in Nursing scientific discipline Address or perhaps a site name.
To change the hostname in Ubuntu, follow these straightforward steps:
1. determine your existing hostname by coming into this command in terminal:
hostname

So on my pc, the hostname is “santhosh-desktop”

2. modification the hostname by editing:
sudo nano /etc/hostname

You will see the prevailing hostname. modification it to no matter new hostname you wish and reserve it by striking Ctrl + O
In this tutorial, i alter it to
gigacore-desktop

3. currently edit the hosts:
sudo nano /etc/hosts

Here modification the ::1 and 127.0.1.1 to the new hostname you selected.
::1 gigacore-desktop localhost6.localdomain6 localhost6
127.0.1.1 gigacore-desktop

3. Restart the hostname service.
sudo /etc/init.d/hostname restart

1 comments:

  1. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.
    Domain Registration Bangalore

    ReplyDelete