]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/hostname.xml
test-execute: Add tests for new PassEnvironment= directive
[thirdparty/systemd.git] / man / hostname.xml
CommitLineData
6a7e63ef 1<?xml version='1.0'?> <!--*-nxml-*-->
6a7e63ef 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
12b42c76 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6a7e63ef
LP
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
5430f7f2
LP
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
6a7e63ef
LP
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
5430f7f2 18 Lesser General Public License for more details.
6a7e63ef 19
5430f7f2 20 You should have received a copy of the GNU Lesser General Public License
6a7e63ef
LP
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22-->
23
24<refentry id="hostname">
798d3a52
ZJS
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
139e5336
MP
60 hostname string. Comments (lines starting with a `#') are ignored.
61 The hostname may be a free-form string up to 64 characters in length;
62 however, it is recommended that it consists only of 7-bit ASCII lower-case
63 characters and no spaces or dots, and limits itself to the format allowed
64 for DNS domain name labels, even though this is not a strict
65 requirement.</para>
798d3a52
ZJS
66
67 <para>Depending on the operating system, other configuration files
68 might be checked for configuration of the hostname as well,
69 however only as fallback.</para>
70
71 <para>You may use
72 <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
73 to change the value of this file during runtime from the command
74 line. Use
75 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
76 to initialize it on mounted (but not booted) system images.</para>
77 </refsect1>
78
79 <refsect1>
80 <title>History</title>
81
82 <para>The simple configuration file format of
83 <filename>/etc/hostname</filename> originates from Debian
84 GNU/Linux.</para>
85 </refsect1>
86
87 <refsect1>
88 <title>See Also</title>
89 <para>
90 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
91 <citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
92 <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
93 <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
94 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
95 <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
96 <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
97 <citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
98 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
99 </para>
100 </refsect1>
6a7e63ef
LP
101
102</refentry>