Change computer name or hostname after installing Ubuntu 14.04

Change computer name after installing Ubuntu 14.04

 

The default name was set when you were installing Ubuntu. You can easily change it to whatever you want in both Desktop & Server by editing the hosts and hostname files. Below is how:

  1. Press CtrlAltt on keyboard to open the terminal. When it opens, run the below command: sudo hostname NEW_NAME_HERE

This will change the hostname until next reboot. The change won’t be visible immediately in your current terminal. Start a new terminal to see the new hostname.

  1. To change the name permanently, run command to edit the host files:
    sudo gedit /etc/hostname and sudo gedit /etc/hosts

    or you can open terminal and press sudo nautilus and enter after that go to computer etc hostname their edit the file as you want then save it

For Ubuntu server without a GUI, run sudo vi /etc/hostname and sudo vi /etc/hosts and edit them one by one. In both files, change the name to what you want and save them.
Finally, restart your computer to apply the changes.

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Hire a server Expert to resolve the issue Now.

Hire a server Expert to resolve the issue Now.

Resolve this issue in just 5$ from https://serverexpert.io

 

You have Successfully Subscribed!

Open chat