Linux

Where Is the Linux Machine ID Stored?

Linux machine-id files in /etc and /var/lib/dbus with uniqueness rules for clones.

Last updated

Linux identifies each install with a machine ID in /etc/machine-id, mirrored for D-Bus clients. Journal files, DHCP client IDs and desktop services key off it.

Cloned VMs sharing an ID confuse logging, licensing and network services. Regenerate it on every golden image before first boot.

Where Linux stores this, by platform

Linux
/etc/machine-id

Single-line hex ID for the install with a compatibility copy at /var/lib/dbus/machine-id. Regenerate clones with systemd-machine-id-setup after deleting the file. Empty file on next boot generates a fresh ID automatically.

Frequently asked questions

Why do cloned VMs conflict on the network?

They share the machine ID above, so DHCP, journals and services collide. Regenerate it per clone before connecting.

How do I regenerate machine-id?

Delete the files above and run systemd-machine-id-setup, or reboot with an empty /etc/machine-id. Do it before services start for a clean identity.

Notice an outdated path? Let us know.