systemd-machine-id-setup
Initialize the machine ID
TLDR
SYNOPSIS
systemd-machine-id-setup [options]
DESCRIPTION
systemd-machine-id-setup initializes the machine ID stored in /etc/machine-id. It is intended for use by system installer tools at install time, or when /etc/machine-id is empty or missing.When invoked without --commit, the tool initializes the machine ID using the first available source in this order:1. A valid ID from /run/machine-id2. An existing D-Bus machine ID3. A machine ID from the system.machine_id credential4. A UUID from the KVM virtual machine configuration5. A UUID from the container environment configuration6. A newly generated random ID as a fallbackThe --commit option is used to convert a transient machine ID (mounted into memory during early boot) into a persistent one written to disk.
PARAMETERS
Print the machine ID after the setup operation completes--commit
Commit a transient machine ID to persistent disk storage. Has no effect if /etc/machine-id is not mounted from memory or if /etc/ is read-only. Primarily used by systemd-machine-id-commit.service--root _path_
Operate on the specified root directory instead of the real root. All paths including /etc/machine-id are prefixed with the given path--image _path_
Operate on the specified disk image (device node or regular file) instead of a directory tree--image-policy _policy_
Specify an image mounting policy string when using --image. Defaults to the "*" policy (all recognized file systems are used)-h, --help
Show brief help and exit--version
Show version information and exit
CAVEATS
Requires root privileges. Should only be run once during system installation or when /etc/machine-id is missing or empty. Changing the machine ID can break services that depend on it for stable identification. Part of the systemd suite.
SEE ALSO
systemd-id128(1), machine-id(5), systemd-firstboot(1)
