RHEL 7 / Fedora 19+ Change Hostname
RedHat decided on a significant number of changes in it's new OS releases. This includes changes to the way the hostname is handled and maintained:
hostnamectl status | Check the hostname. |
hostnamectl set-hostname <HOSTNAME> | Set all hostnames. |
hostnamectl set-hostname <HOSTNAME> [OPTION] |
Options are:
–pretty |
hostnamectl set-hostname "" [OPTION] | Clear hostname. See options above. |
hostnamectl set-hostname -H [USER NAME]@<REMOTE HOST> | Change hostname of a remote machine. |
And that summarizes the hostname command for the new RH Linux releases.
Cheers,
TK