]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/hostname.xml
man: don't claim systemd-analyze was documented as part of the man-pages project
[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<!--
572eb058
ZJS
6 SPDX-License-Identifier: LGPL-2.1+
7
6a7e63ef
LP
8 This file is part of systemd.
9
10 Copyright 2010 Lennart Poettering
6a7e63ef
LP
11-->
12
13<refentry id="hostname">
798d3a52
ZJS
14 <refentryinfo>
15 <title>hostname</title>
16 <productname>systemd</productname>
17
18 <authorgroup>
19 <author>
20 <contrib>Developer</contrib>
21 <firstname>Lennart</firstname>
22 <surname>Poettering</surname>
23 <email>lennart@poettering.net</email>
24 </author>
25 </authorgroup>
26 </refentryinfo>
27
28 <refmeta>
29 <refentrytitle>hostname</refentrytitle>
30 <manvolnum>5</manvolnum>
31 </refmeta>
32
33 <refnamediv>
34 <refname>hostname</refname>
35 <refpurpose>Local hostname configuration file</refpurpose>
36 </refnamediv>
37
38 <refsynopsisdiv>
39 <para><filename>/etc/hostname</filename></para>
40 </refsynopsisdiv>
41
42 <refsect1>
43 <title>Description</title>
44
45 <para>The <filename>/etc/hostname</filename> file configures the
46 name of the local system that is set during boot using the
47 <citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
48 system call. It should contain a single newline-terminated
139e5336
MP
49 hostname string. Comments (lines starting with a `#') are ignored.
50 The hostname may be a free-form string up to 64 characters in length;
51 however, it is recommended that it consists only of 7-bit ASCII lower-case
52 characters and no spaces or dots, and limits itself to the format allowed
53 for DNS domain name labels, even though this is not a strict
54 requirement.</para>
798d3a52 55
798d3a52
ZJS
56 <para>You may use
57 <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
58 to change the value of this file during runtime from the command
59 line. Use
60 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
61 to initialize it on mounted (but not booted) system images.</para>
62 </refsect1>
63
64 <refsect1>
65 <title>History</title>
66
67 <para>The simple configuration file format of
68 <filename>/etc/hostname</filename> originates from Debian
69 GNU/Linux.</para>
70 </refsect1>
71
72 <refsect1>
73 <title>See Also</title>
74 <para>
75 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
76 <citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
77 <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
78 <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
79 <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
80 <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
81 <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
82 <citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
83 <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
84 </para>
85 </refsect1>
6a7e63ef
LP
86
87</refentry>