1MACHINE-ID(5)                     machine-id                     MACHINE-ID(5)
2
3
4

NAME

6       machine-id - Local machine ID configuration file
7

SYNOPSIS

9       /etc/machine-id
10

DESCRIPTION

12       The /etc/machine-id file contains the unique machine ID of the local
13       system that is set during installation. The machine ID is a single
14       newline-terminated, hexadecimal, 32-character, lowercase machine ID
15       string. When decoded from hexadecimal, this corresponds with a
16       16-byte/128-bit string.
17
18       The machine ID is usually generated from a random source during system
19       installation and stays constant for all subsequent boots. Optionally,
20       for stateless systems, it is generated during runtime at boot if it is
21       found to be empty.
22
23       The machine ID does not change based on user configuration or when
24       hardware is replaced.
25
26       This machine ID adheres to the same format and logic as the D-Bus
27       machine ID.
28
29       Programs may use this ID to identify the host with a globally unique ID
30       in the network, which does not change even if the local network
31       configuration changes. Due to this and its greater length, it is a more
32       useful replacement for the gethostid(3) call that POSIX specifies.
33
34       The systemd-machine-id-setup(1) tool may be used by installer tools to
35       initialize the machine ID at install time. Use systemd-firstboot(1) to
36       initialize it on mounted (but not booted) system images.
37

RELATION TO OSF UUIDS

39       Note that the machine ID historically is not an OSF UUID as defined by
40       RFC 4122[1], nor a Microsoft GUID; however, starting with systemd v30,
41       newly generated machine IDs do qualify as v4 UUIDs.
42
43       In order to maintain compatibility with existing installations, an
44       application requiring a UUID should decode the machine ID, and then
45       apply the following operations to turn it into a valid OSF v4 UUID.
46       With "id" being an unsigned character array:
47
48           /* Set UUID version to 4 --- truly random generation */
49           id[6] = (id[6] & 0x0F) | 0x40;
50           /* Set the UUID variant to DCE */
51           id[8] = (id[8] & 0x3F) | 0x80;
52
53       (This code is inspired by "generate_random_uuid()" of
54       drivers/char/random.c from the Linux kernel sources.)
55

HISTORY

57       The simple configuration file format of /etc/machine-id originates in
58       the /var/lib/dbus/machine-id file introduced by D-Bus. In fact, this
59       latter file might be a symlink to /etc/machine-id.
60

SEE ALSO

62       systemd(1), systemd-machine-id-setup(1), gethostid(3), hostname(5),
63       machine-info(5), os-release(5), sd-id128(3), sd_id128_get_machine(3),
64       systemd-firstboot(1)
65

NOTES

67        1. RFC 4122
68           https://tools.ietf.org/html/rfc4122
69
70
71
72systemd 219                                                      MACHINE-ID(5)
Impressum