LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

systemd-machine-id-setup

Initialize the machine ID

TLDR

Initialize the machine ID in /etc/machine-id
$ sudo systemd-machine-id-setup
copy
Print the generated or committed machine ID after setup
$ sudo systemd-machine-id-setup --print
copy
Commit a transient machine ID to persistent storage on disk
$ sudo systemd-machine-id-setup --commit
copy
Operate on a specific root directory
$ sudo systemd-machine-id-setup --root /[path/to/root]
copy
Operate on a disk image
$ sudo systemd-machine-id-setup --image /[path/to/image]
copy

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

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

INSTALL

sudo apt install systemd
copy
sudo dnf install systemd
copy
sudo pacman -S systemd
copy
sudo zypper install systemd
copy
brew install systemd
copy
nix profile install nixpkgs#systemd
copy

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

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid