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

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

 




Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • Logitech MX Master 4 on Fedora Linux – My Final Solaar Configuration
  • How to Backup and Restore Thunderbird Remote Images Whitelist (Clean Install)
  • Installing Fedora 44 KDE Plasma
  • Installing Fedora 44 Xfce
  • Installing Fedora 44 Beta Xfce