The proper way is not manually changing /etc/hostname
, but running this::
hostnamectl set-hostname host
[Wayback] How to change system hostname in SUSE
Background information in [Wayback] linux – What’s the point of the hostnamectl command? – Unix & Linux Stack Exchange (with a great answer by [Wayback] slm, edited by me for Wayback machine links):