1HOSTNAME(5) hostname HOSTNAME(5)
2
3
4
6 hostname - Local hostname configuration file
7
9 /etc/hostname
10
12 The /etc/hostname file configures the name of the local system that is
13 set during boot using the sethostname(2) system call. It should contain
14 a single newline-terminated hostname string. Comments (lines starting
15 with a `#') are ignored. The hostname may be a free-form string up to
16 64 characters in length; however, it is recommended that it consists
17 only of 7-bit ASCII lower-case characters and no spaces or dots, and
18 limits itself to the format allowed for DNS domain name labels, even
19 though this is not a strict requirement.
20
21 You may use hostnamectl(1) to change the value of this file during
22 runtime from the command line. Use systemd-firstboot(1) to initialize
23 it on mounted (but not booted) system images.
24
26 The simple configuration file format of /etc/hostname originates from
27 Debian GNU/Linux.
28
30 systemd(1), sethostname(2), hostname(1), hostname(7), machine-id(5),
31 machine-info(5), hostnamectl(1), systemd-hostnamed.service(8), systemd-
32 firstboot(1)
33
34
35
36systemd 239 HOSTNAME(5)