From Fedora Project Wiki

No edit summary
No edit summary
Line 6: Line 6:
<pre>
<pre>
hostnamectl set-hostname myhost.mydomain
hostnamectl set-hostname myhost.mydomain
</pre>
== Documentation ==
<pre>
man hostnamectl
man hostname
man 5 hostname
man machine-info
</pre>
</pre>

Revision as of 12:30, 20 May 2015

With Fedora 18 the hostname is stored in the file /etc/hostname. During the boot process the transient hostname will be set from systemd according to the content of the file /etc/hostname. The commands hostname and hostnamectl may be used to print or set the system hostname. On Fedora the system hostname is specified as a fully qualified domain name (FQDN).

How to change the hostname

The following command changes the transient and static hostname:

hostnamectl set-hostname myhost.mydomain

Documentation

man hostnamectl
man hostname
man 5 hostname
man machine-info