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:
- Installing OpenIndiana Hipster 2026.10
- Installing Fedora 45 KDE Plasma
- Installing Fedora 45 Xfce
- Installing OpenIndiana Hipster 2026.04
- Local AI on Fedora — Obsidian Online (Google AI Studio)
- Local AI on Fedora — Ollama and Obsidian Offline
- Installing Fedora 45 Beta KDE Plasma
- Logitech MX Master 4 on Fedora 45 – My Final Solaar Configuration
- How to Backup and Restore Thunderbird Remote Images Whitelist (Clean Install)
- Installing Fedora 44 KDE Plasma