From b750101eb236130cf056c675997decbac904cc49 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 17:35:18 +0200 Subject: Adding upstream version 252.22. Signed-off-by: Daniel Baumann --- man/hostname.xml | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 man/hostname.xml (limited to 'man/hostname.xml') diff --git a/man/hostname.xml b/man/hostname.xml new file mode 100644 index 0000000..d050703 --- /dev/null +++ b/man/hostname.xml @@ -0,0 +1,116 @@ + + +%entities; +]> + + + + + hostname + systemd + + + + hostname + 5 + + + + hostname + Local hostname configuration file + + + + /etc/hostname + + + + Description + + The /etc/hostname file configures the name of the local system. Unless + overridden as described in the next section, + systemd1 will set this + hostname during boot using the + sethostname2 system + call. + + The file should contain a single newline-terminated hostname string. Comments (lines starting with + a #) are ignored. The hostname should be composed of up to 64 7-bit ASCII lower-case + alphanumeric characters or hyphens forming a valid DNS domain name. It is recommended that this name + contains only a single label, i.e. without any dots. Invalid characters will be filtered out in an + attempt to make the name valid, but obviously it is recommended to use a valid name and not rely on this + filtering. + + You may use + hostnamectl1 to change + the value of this file during runtime from the command line. Use + systemd-firstboot1 to + initialize it on mounted (but not booted) system images. + + + + Hostname semantics + + systemd1 and the + associated tools will obtain the hostname in the following ways: + + If the kernel commandline parameter systemd.hostname= specifies a + valid hostname, + systemd1 will use it + to set the hostname during early boot, see + kernel-command-line7, + + + Otherwise, the "static" hostname specified by /etc/hostname as + described above will be used. + + Otherwise, a transient hostname may be set during runtime, for example based on + information in a DHCP lease, see + systemd-hostnamed.service8. + Both NetworkManager and + systemd-networkd.service8 + allow this. Note that + systemd-hostnamed.service8 + gives higher priority to the static hostname, so the transient hostname will only be used if the static + hostname is not configured. + + Otherwise, a fallback hostname configured at compilation time will be used + (&FALLBACK_HOSTNAME;). + + + + + Effectively, the static hostname has higher priority than a transient hostname, which has higher + priority than the fallback hostname. Transient hostnames are equivalent, so setting a new transient + hostname causes the previous transient hostname to be forgotten. The hostname specified on the kernel + command line is like a transient hostname, with the exception that it has higher priority when the + machine boots. Also note that those are the semantics implemented by systemd tools, but other programs + may also set the hostname. + + + + History + + The simple configuration file format of + /etc/hostname originates from Debian + GNU/Linux. + + + + See Also + + systemd1, + sethostname2, + hostname1, + hostname7, + machine-id5, + machine-info5, + hostnamectl1, + systemd-hostnamed.service8, + systemd-firstboot1 + + + + -- cgit v1.2.3