2009-05-21 09:02:42 -05:00
|
|
|
.\" Copyright 1999 Andreas Dilger (adilger@enel.ucalgary.ca)
|
|
|
|
.\"
|
|
|
|
.\" This file may be copied under the terms of the GNU Public License.
|
2011-08-18 15:18:34 -05:00
|
|
|
.TH UUIDGEN 1 "June 2011" "util-linux" "User Commands"
|
2009-05-21 09:02:42 -05:00
|
|
|
.SH NAME
|
2011-08-18 15:18:34 -05:00
|
|
|
uuidgen \- create a new UUID value
|
2009-05-21 09:02:42 -05:00
|
|
|
.SH SYNOPSIS
|
|
|
|
.B uuidgen
|
2014-12-14 13:45:29 -06:00
|
|
|
[options]
|
2009-05-21 09:02:42 -05:00
|
|
|
.SH DESCRIPTION
|
|
|
|
The
|
|
|
|
.B uuidgen
|
|
|
|
program creates (and prints)
|
|
|
|
a new universally unique identifier (UUID) using the
|
|
|
|
.BR libuuid (3)
|
|
|
|
library. The new UUID can reasonably be considered unique among
|
|
|
|
all UUIDs created on the local system,
|
|
|
|
and among UUIDs created on other systems in the past
|
|
|
|
and in the future.
|
|
|
|
.PP
|
2017-08-28 14:36:30 -05:00
|
|
|
There are three types of UUIDs which
|
2009-05-21 09:02:42 -05:00
|
|
|
.B uuidgen
|
2017-08-28 14:36:30 -05:00
|
|
|
can generate: time-based UUIDs, random-based UUIDs, and hash-based UUIDs.
|
|
|
|
By default
|
2009-05-21 09:02:42 -05:00
|
|
|
.B uuidgen
|
|
|
|
will generate a random-based UUID if a high-quality random number
|
2011-08-28 04:14:42 -05:00
|
|
|
generator is present. Otherwise, it will choose a time-based UUID.
|
2017-08-28 14:36:30 -05:00
|
|
|
It is possible to force the generation of one of these first two
|
2009-05-21 09:02:42 -05:00
|
|
|
UUID types by using the
|
2017-11-26 11:27:21 -06:00
|
|
|
.B \-\-random
|
2009-05-21 09:02:42 -05:00
|
|
|
or
|
2017-11-26 11:27:21 -06:00
|
|
|
.B \-\-time
|
2009-05-21 09:02:42 -05:00
|
|
|
options.
|
2017-08-28 14:36:30 -05:00
|
|
|
.PP
|
|
|
|
The third type of UUID is generated with the
|
2017-11-26 11:27:21 -06:00
|
|
|
.B \-\-md5
|
2017-08-28 14:36:30 -05:00
|
|
|
or
|
2017-11-26 11:27:21 -06:00
|
|
|
.B \-\-sha1
|
|
|
|
options, followed by
|
|
|
|
\fB\-\-namespace\fR \fInamespace\fR
|
2017-08-28 14:36:30 -05:00
|
|
|
and
|
2017-11-26 11:27:21 -06:00
|
|
|
\fB\-\-name\fR \fIname\fR.
|
2017-08-28 14:36:30 -05:00
|
|
|
The \fInamespace\fR may either be a well-known UUID, or else
|
|
|
|
an alias to one of the well-known UUIDs defined in RFC 4122, that is
|
|
|
|
.BR @dns ,
|
|
|
|
.BR @url ,
|
|
|
|
.BR @oid ,
|
|
|
|
or
|
|
|
|
.BR @x500 .
|
|
|
|
The \fIname\fR is an arbitrary string value. The generated UUID is the
|
2018-02-15 15:02:18 -06:00
|
|
|
digest of the concatenation of the namespace UUID and the name value, hashed
|
2017-08-28 14:36:30 -05:00
|
|
|
with the MD5 or SHA1 algorithms. It is, therefore, a predictable value
|
|
|
|
which may be useful when UUIDs are being used as handles or nonces for
|
|
|
|
more complex values or values which shouldn't be disclosed directly.
|
|
|
|
See the RFC for more information.
|
2009-05-21 09:02:42 -05:00
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
2011-08-28 04:14:42 -05:00
|
|
|
.BR \-r , " \-\-random"
|
2009-05-21 09:02:42 -05:00
|
|
|
Generate a random-based UUID. This method creates a UUID consisting mostly
|
|
|
|
of random bits. It requires that the operating system have a high
|
|
|
|
quality random number generator, such as
|
|
|
|
.IR /dev/random .
|
|
|
|
.TP
|
2011-08-28 04:14:42 -05:00
|
|
|
.BR \-t , " \-\-time"
|
2009-05-21 09:02:42 -05:00
|
|
|
Generate a time-based UUID. This method creates a UUID based on the system
|
|
|
|
clock plus the system's ethernet hardware address, if present.
|
2011-06-12 08:22:18 -05:00
|
|
|
.TP
|
2011-08-28 04:14:42 -05:00
|
|
|
.BR \-h , " \-\-help"
|
|
|
|
Display help text and exit.
|
2011-06-12 08:22:18 -05:00
|
|
|
.TP
|
2011-08-28 04:14:42 -05:00
|
|
|
.BR \-V , " \-\-version"
|
|
|
|
Display version information and exit.
|
2017-08-28 14:36:30 -05:00
|
|
|
.TP
|
|
|
|
.BR \-m , " \-\-md5"
|
|
|
|
Use MD5 as the hash algorithm.
|
|
|
|
.TP
|
|
|
|
.BR \-s , " \-\-sha1"
|
2018-02-15 15:02:18 -06:00
|
|
|
Use SHA1 as the hash algorithm.
|
2017-08-28 14:36:30 -05:00
|
|
|
.TP
|
|
|
|
.BR \-n , " \-\-namespace " \fInamespace\fP
|
2017-09-05 05:17:26 -05:00
|
|
|
Generate the hash with the \fInamespace\fP prefix. The \fInamespace\fP is UUID,
|
|
|
|
or '@ns' where "ns" is well-known predefined UUID addressed by namespace name
|
|
|
|
(see above).
|
2017-08-28 14:36:30 -05:00
|
|
|
.TP
|
|
|
|
.BR \-N , " \-\-name " \fIname\fR
|
|
|
|
Generate the hash of the \fIname\fR.
|
|
|
|
.TP
|
|
|
|
.BR \-x , " \-\-hex"
|
2018-02-15 15:02:18 -06:00
|
|
|
Interpret name \fIname\fR as a hexadecimal string.
|
2009-05-21 09:02:42 -05:00
|
|
|
.SH "CONFORMING TO"
|
|
|
|
OSF DCE 1.1
|
2017-11-26 11:27:21 -06:00
|
|
|
.SH EXAMPLES
|
|
|
|
uuidgen \-\-sha1 \-\-namespace @dns \-\-name "www.example.com"
|
2009-05-21 09:02:42 -05:00
|
|
|
.SH AUTHOR
|
|
|
|
.B uuidgen
|
|
|
|
was written by Andreas Dilger for libuuid.
|
2013-03-17 16:05:19 -05:00
|
|
|
.SH SEE ALSO
|
2017-08-28 14:36:30 -05:00
|
|
|
.BR libuuid (3),
|
|
|
|
.B "RFC 4122"
|
2009-05-21 09:02:42 -05:00
|
|
|
.SH AVAILABILITY
|
2010-11-30 04:41:59 -06:00
|
|
|
The uuidgen command is part of the util-linux package and is available from
|
2016-12-17 02:06:57 -06:00
|
|
|
https://www.kernel.org/pub/linux/utils/util-linux/.
|