Product SiteDocumentation Site

3.2.2. Set All the Host Names

To set all the host names on a system, enter the following command as root:
~]# hostnamectl set-hostname name
This will alter the pretty, static, and transient host names alike. The static and transient host names will be simplified forms of the pretty host name. Spaces will be replaced with - and special characters will be removed.