Warning: I had troubles with some of my systems after changing the hostname (namely I couldn’t SSH into the system anymore remotely). Make sure you’re knowing what you’re doing!
To change the hostname on a system, you need to edit the file
/etc/hostname. The content of the file would be just:
To activate the change after you edited the file, run this command:
hostname command (which is used to display the hostname of the system) shows:
The change you made to the hostname file will be preserved upon system reboot.