[networking-guide] master: Configuring Host Names Using nmcli (c35ebce)
stephenw at fedoraproject.org
stephenw at fedoraproject.org
Tue Jan 6 22:02:29 UTC 2015
Repository : http://git.fedorahosted.org/cgit/docs/networking-guide.git
On branch : master
>---------------------------------------------------------------
commit c35ebce133cd73da8997b6f956795ee602a9f64a
Author: Stephen Wadeley <swadeley at redhat.com>
Date: Tue Jan 6 23:01:33 2015 +0100
Configuring Host Names Using nmcli
>---------------------------------------------------------------
en-US/Configure_Host_Names.xml | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/en-US/Configure_Host_Names.xml b/en-US/Configure_Host_Names.xml
index ed8a6e7..8eca801 100644
--- a/en-US/Configure_Host_Names.xml
+++ b/en-US/Configure_Host_Names.xml
@@ -82,6 +82,19 @@
</section>
</section>
+ <section id="sec-Configuring_Host_Names_Using_nmcli">
+ <title>Configuring Host Names Using nmcli</title>
+ <para>
+ The <application>NetworkManager</application> tool <application>nmcli</application> can be used to query and set the static host name in the <filename>/etc/hostname</filename> file. Note that at time of writing, changing the host name in this way will not be noticed by <application>hostnamectl</application>.</para>
+ <para>
+ To query the static host name, issue the following command:
+ <screen>~]$ <command>nmcli general hostname</command></screen>
+ To set the static host name to <replaceable>my-server</replaceable>, issue the following command as <systemitem class="username">root</systemitem>:
+ <screen>~]# <command>nmcli general hostname <replaceable>my-server</replaceable></command></screen>
+ To force <application>hostnamectl</application> to notice the change in the static host name, restart <systemitem class="daemon">hostnamed</systemitem> as <systemitem class="username">root</systemitem>:
+ <screen>~]# <command>systemctl restart systemd-hostnamed</command></screen>
+ </para>
+ </section>
<!--Topics, Reference-->
<section id="sec-additional_resources">
More information about the docs-commits
mailing list