To change the hostname (computer name) on Arch Linux, you can use the hostnamectl
command. This command allows you to view and set the hostname of your system, as well as other related settings.
To change the hostname on Arch Linux, you can use the hostnamectl
command with the set-hostname
option, followed by the new hostname. For example, the following command will set the hostname to new-hostname
:
hostnamectl set-hostname new-hostname
After changing the hostname, you will need to restart your system for the changes to take effect. You can do this by running the reboot
command, as shown below:
reboot
After restarting your system, the new hostname will be applied and you can verify it by running the hostnamectl
command without any options. This will display the current hostname, along with other related settings.
By using the hostnamectl
command, you can easily change the hostname on Arch Linux. This can be useful for identifying your system on a network, and for customizing the name of your system to your preferences.