How to change the hostname on Linux
If we forget to customize the machine name during the installation of the operating system, we can do it later. The easiest method is using the command line.
This instruction is valid for a computer used at home, which is not part of a enterprise network. We use the hostnamectl command:
hostnamectl set-hostname new-name
ls
This name is stored in the /etc/hostname file.
We can simultaneously check the machine name, operating system, kernel version and architecture with this command:
hostnamectl status
ls
Enjoy Reading This Article?
Here are some more articles you might like to read next: