Easy Ways to Change Hostname on Ubuntu Linux

The general hostname is the name of the computer. Giving this specific name, for one particular computer in a network. Because of its unique nature, there cannot be 2 or more same hostnames in one network. If there is the same naming, the system will notify that there has been a duplicate name. But if the computers are not connected to the network giving the same computer name doesn’t matter.

What is a HOSTNAME on Linux?

Hostname in Linux is the name given to a computer on a network. Basically a hostname is just a computer name, which is used to identify a computer on the network. The hostname is also displayed in the terminal.

As you can see above, the username is geek , and the hostname is Latitude-E6220 .

Note: You can change your hostname however you want, but you should not use the same hostname on two different computers on a network, as this can cause problems.

If you don’t know how to change the Hostname on the Ubuntu Linux operating system, you can follow the steps made by a computer smartwatch below. There are two ways, namely by using the GUI and Command Line.

Changing the Hostname Using the GUI

To change the hostname using the GUI, the first step you have to do is open System Settings. After that select Details.

You will see a column to change the device name. Change Device Name.

When you check the hostname in the terminal it has changed.

Changing the Hostname Using Terminal

If you wish to change the hostaname using the terminal, follow the steps below:

sudo nano /etc/hostname

Open a terminal. In order to change your hostname, you will need to edit your / etc / hostname file, which is where Ubuntu, Mint and other Debian-based distributions store hostnames here.

Change according to your wishes. To see the changes you need to restart the computer.

That’s an easy way to change the hostname on Ubuntu Linux, Hopefully it’s useful

Leave a Reply

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