1 .\" Copyright 1999 Andreas Dilger (adilger@enel.ucalgary.ca)
3 .\" This file may be copied under the terms of the GNU Public License.
4 .TH UUIDGEN 1 "June 2011" "util-linux" "User Commands"
6 uuidgen \- create a new UUID value
13 program creates (and prints)
14 a new universally unique identifier (UUID) using the
16 library. The new UUID can reasonably be considered unique among
17 all UUIDs created on the local system,
18 and among UUIDs created on other systems in the past
21 There are three types of UUIDs which
23 can generate: time-based UUIDs, random-based UUIDs, and hash-based UUIDs.
26 will generate a random-based UUID if a high-quality random number
27 generator is present. Otherwise, it will choose a time-based UUID.
28 It is possible to force the generation of one of these first two
29 UUID types by using the
35 The third type of UUID is generated with the
40 \fB\-\-namespace\fR \fInamespace\fR
42 \fB\-\-name\fR \fIname\fR.
43 The \fInamespace\fR may either be a well-known UUID, or else
44 an alias to one of the well-known UUIDs defined in RFC 4122, that is
50 The \fIname\fR is an arbitrary string value. The generated UUID is the
51 digest of the concatenation of the namespace UUID and the name value, hashed
52 with the MD5 or SHA1 algorithms. It is, therefore, a predictable value
53 which may be useful when UUIDs are being used as handles or nonces for
54 more complex values or values which shouldn't be disclosed directly.
55 See the RFC for more information.
58 .BR \-r , " \-\-random"
59 Generate a random-based UUID. This method creates a UUID consisting mostly
60 of random bits. It requires that the operating system have a high
61 quality random number generator, such as
65 Generate a time-based UUID. This method creates a UUID based on the system
66 clock plus the system's ethernet hardware address, if present.
69 Display help text and exit.
71 .BR \-V , " \-\-version"
72 Display version information and exit.
75 Use MD5 as the hash algorithm.
78 Use SHA1 as the hash algorithm.
80 .BR \-n , " \-\-namespace " \fInamespace\fP
81 Generate the hash with the \fInamespace\fP prefix. The \fInamespace\fP is UUID,
82 or '@ns' where "ns" is well-known predefined UUID addressed by namespace name
85 .BR \-N , " \-\-name " \fIname\fR
86 Generate the hash of the \fIname\fR.
89 Interpret name \fIname\fR as a hexadecimal string.
93 uuidgen \-\-sha1 \-\-namespace @dns \-\-name "www.example.com"
96 was written by Andreas Dilger for libuuid.
101 The uuidgen command is part of the util-linux package and is available from
102 https://www.kernel.org/pub/linux/utils/util-linux/.