How to change the hostname in Ubuntu 16.04

IBM server

The hostname on a computer is something important. At least nowadays where thanks to the Internet, many computers are connected through the great Network. Hostname is the name that is assigned to a computer or equipment within a network.

In such a way that when we want to refer to the team, we don't have to use a numeric or alpha numeric reference provided by the IP Address of the network card but we can do it through the name that we have on the computer through this element.

The hostname helps us to identify the name of our team in a network

Generally, We create this element or it is created by Ubuntu during installation, but it is something that we can change at any time without having to perform a reinstallation or something similar, we will only need a terminal.

First, first of all, it is advisable to know the status of our team regarding the hostname information. To do this we have to open a terminal and write the following command:

hostnamectl status

This command will not only indicate the name of the hostname but also it will tell us other data related to the hostname such as the kernel we use, the architecture that we have or the identifier of the equipment, data that we can obtain through other commands although they will not allow us to change the name of the hostname. Knowing the name of the hostname, we can change it by typing the following in the terminal:

hostnamectl set-hostname "nombre nuevo del hostname"

Esto will modify the hostname of our team, something that we can verify with the first command used previously.

The hostname may seem somewhat useless or worthless but it is an important element if we want to use our equipment in a network and something that we will need to change if, for example, we want to insert the device into a network with a device with the same name or modify the names remotely.


Leave a Comment

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

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   fjmurillov3743 said

    they are excellent, thanks we are connected