1DBUS-UUIDGEN(1) User Commands DBUS-UUIDGEN(1)
2
3
4
6 dbus-uuidgen - Utility to generate UUIDs
7
9 dbus-uuidgen [--version] [--ensure [=FILENAME]] [--get [=FILENAME]]
10
11
13 The dbus-uuidgen command generates or reads a universally unique ID.
14
15 Note that the D-Bus UUID has no relationship to RFC 4122 and does not
16 generate UUIDs compatible with that spec. Many systems have a separate
17 command for that (often called "uuidgen").
18
19 See http://www.freedesktop.org/software/dbus/ for more information
20 about D-Bus.
21
22 The primary usage of dbus-uuidgen is to run in the post-install script
23 of a D-Bus package like this:
24
25 dbus-uuidgen --ensure
26
27 This will ensure that /var/lib/dbus/machine-id exists and has the uuid
28 in it. It won't overwrite an existing uuid, since this id should remain
29 fixed for a single machine until the next reboot at least.
30
31 The important properties of the machine UUID are that 1) it remains
32 unchanged until the next reboot and 2) it is different for any two
33 running instances of the OS kernel. That is, if two processes see the
34 same UUID, they should also see the same shared memory, UNIX domain
35 sockets, local X displays, localhost.localdomain resolution, process
36 IDs, and so forth.
37
38 If you run dbus-uuidgen with no options it just prints a new uuid made
39 up out of thin air.
40
41 If you run it with --get, it prints the machine UUID by default, or the
42 UUID in the specified file if you specify a file.
43
44 If you try to change an existing machine-id on a running system, it
45 will probably result in bad things happening. Don't try to change this
46 file. Also, don't make it the same on two different systems; it needs
47 to be different anytime there are two different kernels running.
48
49 The UUID should be different on two different virtual machines, because
50 there are two different kernels.
51
53 The following options are supported:
54
55 --get[=FILENAME]
56 If a filename is not given, defaults to
57 localstatedir/lib/dbus/machine-id (localstatedir is usually /var).
58 If this file exists and is valid, the uuid in the file is printed
59 on stdout. Otherwise, the command exits with a nonzero status.
60
61 --ensure[=FILENAME]
62 If a filename is not given, defaults to
63 localstatedir/lib/dbus/machine-id (localstatedir is usually /var).
64 If this file exists then it will be validated, and a failure code
65 returned if it contains the wrong thing. If the file does not
66 exist, it will be created with a new uuid in it. On success, prints
67 no output.
68
69 --version
70 Print the version of dbus-uuidgen
71
73 See http://www.freedesktop.org/software/dbus/doc/AUTHORS
74
76 Please send bug reports to the D-Bus mailing list or bug tracker, see
77 http://www.freedesktop.org/software/dbus/
78
79
80
81D-Bus 1.14.0 03/10/2022 DBUS-UUIDGEN(1)