'\" t
.\"     Title: dbus-uuidgen
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\"    Manual: User Commands
.\"    Source: D-Bus 1.12.28
.\"  Language: English
.\"
.TH "DBUS\-UUIDGEN" "1" "" "D\-Bus 1\&.12\&.28" "User Commands"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
dbus-uuidgen \- Utility to generate UUIDs
.SH "SYNOPSIS"
.HP \w'\fBdbus\-uuidgen\fR\ 'u
\fBdbus\-uuidgen\fR [\-\-version] [\-\-ensure\ [\fI=FILENAME\fR]] [\-\-get\ [\fI=FILENAME\fR]]
.br

.SH "DESCRIPTION"
.PP
The
\fBdbus\-uuidgen\fR
command generates or reads a universally unique ID\&.
.PP
Note that the D\-Bus UUID has no relationship to RFC 4122 and does not generate UUIDs compatible with that spec\&. Many systems have a separate command for that (often called "uuidgen")\&.
.PP
See
\m[blue]\fBhttp://www\&.freedesktop\&.org/software/dbus/\fR\m[]
for more information about D\-Bus\&.
.PP
The primary usage of
\fBdbus\-uuidgen\fR
is to run in the post\-install script of a D\-Bus package like this:
.sp
.if n \{\
.RS 4
.\}
.nf
  dbus\-uuidgen \-\-ensure
.fi
.if n \{\
.RE
.\}
.PP
This will ensure that /var/lib/dbus/machine\-id exists and has the uuid in it\&. It won\*(Aqt overwrite an existing uuid, since this id should remain fixed for a single machine until the next reboot at least\&.
.PP
The important properties of the machine UUID are that 1) it remains unchanged until the next reboot and 2) it is different for any two running instances of the OS kernel\&. That is, if two processes see the same UUID, they should also see the same shared memory, UNIX domain sockets, local X displays, localhost\&.localdomain resolution, process IDs, and so forth\&.
.PP
If you run
\fBdbus\-uuidgen\fR
with no options it just prints a new uuid made up out of thin air\&.
.PP
If you run it with \-\-get, it prints the machine UUID by default, or the UUID in the specified file if you specify a file\&.
.PP
If you try to change an existing machine\-id on a running system, it will probably result in bad things happening\&. Don\*(Aqt try to change this file\&. Also, don\*(Aqt make it the same on two different systems; it needs to be different anytime there are two different kernels running\&.
.PP
The UUID should be different on two different virtual machines, because there are two different kernels\&.
.SH "OPTIONS"
.PP
The following options are supported:
.PP
\fB\-\-get[=FILENAME]\fR
.RS 4
If a filename is not given, defaults to localstatedir/lib/dbus/machine\-id (localstatedir is usually /var)\&. If this file exists and is valid, the uuid in the file is printed on stdout\&. Otherwise, the command exits with a nonzero status\&.
.RE
.PP
\fB\-\-ensure[=FILENAME]\fR
.RS 4
If a filename is not given, defaults to localstatedir/lib/dbus/machine\-id (localstatedir is usually /var)\&. If this file exists then it will be validated, and a failure code returned if it contains the wrong thing\&. If the file does not exist, it will be created with a new uuid in it\&. On success, prints no output\&.
.RE
.PP
\fB\-\-version\fR
.RS 4
Print the version of dbus\-uuidgen
.RE
.SH "AUTHOR"
.PP
See
\m[blue]\fBhttp://www\&.freedesktop\&.org/software/dbus/doc/AUTHORS\fR\m[]
.SH "BUGS"
.PP
Please send bug reports to the D\-Bus mailing list or bug tracker, see
\m[blue]\fBhttp://www\&.freedesktop\&.org/software/dbus/\fR\m[]
