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