Update to util-linux-2.30.
[linux_from_scratch.git] / chapter07 / hostname.xml
blob07de15e988e11bed0f884224ed4cbca3a2420c60
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4   <!ENTITY % general-entities SYSTEM "../general.ent">
5   %general-entities;
6 ]>
8 <sect1 id="ch-scripts-hostname">
9   <?dbhtml filename="hostname.html"?>
11   <title>Configuring the system hostname</title>
13   <indexterm zone="ch-scripts-hostname">
14     <primary sortas="d-hostname">hostname</primary>
15     <secondary>configuring</secondary>
16   </indexterm>
18   <para>During the boot process, both Systemd and System V use the same
19   file for establishing the system's hostname.  This needs to be configured by
20   creating <filename>/etc/hostname</filename>.</para>
22   <para>Create the <filename>/etc/hostname</filename> file and enter a
23   hostname by running:</para>
25 <screen><userinput>echo "<replaceable>&lt;lfs&gt;</replaceable>" &gt; /etc/hostname</userinput></screen>
27   <para><replaceable>&lt;lfs&gt;</replaceable> needs to be replaced with the name given
28   to the computer. Do not enter the Fully Qualified Domain Name (FQDN) here. That
29   information is put in the <filename>/etc/hosts</filename> file.</para>
31 </sect1>