chiark / gitweb /
Add man page and references to it.
[elogind.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   This file is part of systemd.
7
8   Copyright 2010 Lennart Poettering
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="hostname">
25   <refentryinfo>
26     <title>hostname</title>
27     <productname>systemd</productname>
28
29     <authorgroup>
30       <author>
31         <contrib>Developer</contrib>
32         <firstname>Lennart</firstname>
33         <surname>Poettering</surname>
34         <email>lennart@poettering.net</email>
35       </author>
36     </authorgroup>
37   </refentryinfo>
38
39   <refmeta>
40     <refentrytitle>hostname</refentrytitle>
41     <manvolnum>5</manvolnum>
42   </refmeta>
43
44   <refnamediv>
45     <refname>hostname</refname>
46     <refpurpose>Local hostname configuration file</refpurpose>
47   </refnamediv>
48
49   <refsynopsisdiv>
50     <para><filename>/etc/hostname</filename></para>
51   </refsynopsisdiv>
52
53   <refsect1>
54     <title>Description</title>
55
56     <para>The <filename>/etc/hostname</filename> file configures the
57     name of the local system that is set during boot using the
58     <citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
59     system call. It should contain a single newline-terminated
60     hostname string. The hostname may be a free-form string up to 64
61     characters in length; however, it is recommended that it consists
62     only of 7-bit ASCII lower-case characters and no spaces or dots,
63     and limits itself to the format allowed for DNS domain name
64     labels, even though this is not a strict requirement.</para>
65
66     <para>Depending on the operating system, other configuration files
67     might be checked for configuration of the hostname as well,
68     however only as fallback.</para>
69
70     <para>You may use
71     <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
72     to change the value of this file during runtime from the command
73     line. Use
74     <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
75     to initialize it on mounted (but not booted) system images.</para>
76   </refsect1>
77
78   <refsect1>
79     <title>History</title>
80
81     <para>The simple configuration file format of
82     <filename>/etc/hostname</filename> originates from Debian
83     GNU/Linux.</para>
84   </refsect1>
85
86   <refsect1>
87       <title>See Also</title>
88       <para>
89         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
90         <citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
91         <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
92         <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
93         <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
94         <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
95         <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
96         <citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
97         <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
98       </para>
99   </refsect1>
100
101 </refentry>