1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
4 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
7 This file is part of systemd.
9 Copyright 2010 Lennart Poettering
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25 <refentry id="hostname">
27 <title>/etc/hostname</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
41 <refentrytitle>hostname</refentrytitle>
42 <manvolnum>5</manvolnum>
46 <refname>hostname</refname>
47 <refpurpose>local host name configuration file</refpurpose>
51 <para><filename>/etc/hostname</filename></para>
55 <title>Description</title>
57 <para>The <filename>/etc/hostname</filename> file
58 configures the name of the local system that is set
60 <citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
61 system call. It should contain a single
62 newline-terminated host name string. The
63 host name may be a free-form string up to 64 characters
64 in length, however it is recommended that it consists
65 only of 7bit ASCII characters and no spaces or dots,
66 and limit itself to the format allowed for DNS domain
67 name labels, even though this is not a
70 <para>Depending on the operating system other
71 configuration files might be checked for configuration
72 of the host name as well, however only as fallback.</para>
76 <title>History</title>
78 <para>The simple configuration file format of
79 <filename>/etc/hostname</filename> originates from
80 Debian GNU/Linux.</para>
84 <title>See Also</title>
86 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
87 <citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
88 <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>