Change the computer name in Linux (Hostname)

Below instant tutorial on how we can change the computer name in Linux (Hostname) In Debian systems, Ubuntu, The CentOS is literally 2 minutes.

Checking the current name of the server you can be done using the command:

or:

Edit your nano /etc/hosts

The file should look like this:

the next step is to edit the file nano / etc / hostname

And we enter the hostname node

We make a server restart.
When you log into the console, we can verify all the commands:

for systems CentOS issue the command:

I also make a server restart.

In case of Ubuntu We use the same principle as a means for Centos

How useful this post was?

Click on the star, to evaluate it!

Average grade / 5. number of votes:

So far, no votes! Be the first to rate this post.