]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/hostname.xml
Correct more spelling errors.
[thirdparty/systemd.git] / man / hostname.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6 SPDX-License-Identifier: LGPL-2.1+
7 -->
8
9 <refentry id="hostname">
10 <refentryinfo>
11 <title>hostname</title>
12 <productname>systemd</productname>
13 </refentryinfo>
14
15 <refmeta>
16 <refentrytitle>hostname</refentrytitle>
17 <manvolnum>5</manvolnum>
18 </refmeta>
19
20 <refnamediv>
21 <refname>hostname</refname>
22 <refpurpose>Local hostname configuration file</refpurpose>
23 </refnamediv>
24
25 <refsynopsisdiv>
26 <para><filename>/etc/hostname</filename></para>
27 </refsynopsisdiv>
28
29 <refsect1>
30 <title>Description</title>
31
32 <para>The <filename>/etc/hostname</filename> file configures the
33 name of the local system that is set during boot using the
34 <citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
35 system call. It should contain a single newline-terminated
36 hostname string. Comments (lines starting with a `#') are ignored.
37 The hostname may be a free-form string up to 64 characters in length;
38 however, it is recommended that it consists only of 7-bit ASCII lower-case
39 characters and no spaces or dots, and limits itself to the format allowed
40 for DNS domain name labels, even though this is not a strict
41 requirement.</para>
42
43 <para>You may use
44 <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
45 to change the value of this file during runtime from the command
46 line. Use
47 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
48 to initialize it on mounted (but not booted) system images.</para>
49 </refsect1>
50
51 <refsect1>
52 <title>History</title>
53
54 <para>The simple configuration file format of
55 <filename>/etc/hostname</filename> originates from Debian
56 GNU/Linux.</para>
57 </refsect1>
58
59 <refsect1>
60 <title>See Also</title>
61 <para>
62 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
63 <citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
64 <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
65 <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
66 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
67 <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
68 <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
69 <citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
70 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
71 </para>
72 </refsect1>
73
74 </refentry>