]> git.ipfire.org Git - thirdparty/util-linux.git/blame - misc-utils/uuidgen.1.adoc
autotools: add missing dist_noinst_DATA
[thirdparty/util-linux.git] / misc-utils / uuidgen.1.adoc
CommitLineData
295b3979 1//po4a: entry man manual
6c64d12d
MB
2////
3Copyright 1999 Andreas Dilger (adilger@enel.ucalgary.ca)
4This file may be copied under the terms of the GNU Public License.
5////
6= uuidgen(1)
7:doctype: manpage
8:man manual: User Commands
9:man source: util-linux {release-version}
10:page-layout: base
11:command: uuidgen
12
13== NAME
14
15uuidgen - create a new UUID value
16
17== SYNOPSIS
18
19*uuidgen* [options]
20
21== DESCRIPTION
22
23The *uuidgen* program creates (and prints) a new universally unique identifier (UUID) using the *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.
24
25There are three types of UUIDs which *uuidgen* can generate: time-based UUIDs, random-based UUIDs, and hash-based UUIDs. By default *uuidgen* will generate a random-based UUID if a high-quality random number generator is present. Otherwise, it will choose a time-based UUID. It is possible to force the generation of one of these first two UUID types by using the *--random* or *--time* options.
26
27The third type of UUID is generated with the *--md5* or *--sha1* options, followed by *--namespace* _namespace_ and *--name* _name_. The _namespace_ may either be a well-known UUID, or else an alias to one of the well-known UUIDs defined in RFC 4122, that is *@dns*, *@url*, *@oid*, or *@x500*. The _name_ is an arbitrary string value. The generated UUID is the digest of the concatenation of the namespace UUID and the name value, hashed 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.
28
29== OPTIONS
30
31*-r*, *--random*::
2c646c80 32Generate a random-based UUID. This method creates a UUID consisting mostly of random bits. It requires that the operating system has a high quality random number generator, such as _/dev/random_.
6c64d12d
MB
33
34*-t*, *--time*::
2c646c80 35Generate a time-based UUID. This method creates a UUID based on the system clock plus the system's ethernet hardware address, if present.
6c64d12d 36
2b2d3172 37include::man-common/help-version.adoc[]
6c64d12d
MB
38
39*-m*, *--md5*::
2c646c80 40Use MD5 as the hash algorithm.
6c64d12d
MB
41
42*-s*, *--sha1*::
2c646c80 43Use SHA1 as the hash algorithm.
6c64d12d
MB
44
45*-n*, *--namespace* _namespace_::
2c646c80 46Generate the hash with the _namespace_ prefix. The _namespace_ is UUID, or '@ns' where "ns" is well-known predefined UUID addressed by namespace name (see above).
6c64d12d
MB
47
48*-N*, *--name* _name_::
2c646c80 49Generate the hash of the _name_.
6c64d12d 50
06d3a851
KZ
51*-C*, *--count* _num_::
52Generate multiple UUIDs using the enhanced capability of the libuuid to cache time-based UUIDs, thus resulting in improved performance. However, this holds no significance for other UUID types.
53
6c64d12d 54*-x*, *--hex*::
2c646c80 55Interpret name _name_ as a hexadecimal string.
6c64d12d
MB
56
57== CONFORMING TO
58
59OSF DCE 1.1
60
61== EXAMPLES
62
63uuidgen --sha1 --namespace @dns --name "www.example.com"
64
65== AUTHORS
66
67*uuidgen* was written by Andreas Dilger for *libuuid*(3).
68
69== SEE ALSO
70
6458b7da 71*uuidparse*(1),
2c646c80 72*libuuid*(3),
6c64d12d
MB
73link:https://tools.ietf.org/html/rfc4122[RFC 4122]
74
625e9c61 75include::man-common/bugreports.adoc[]
6c64d12d 76
625e9c61 77include::man-common/footer.adoc[]
6c64d12d
MB
78
79ifdef::translation[]
625e9c61 80include::man-common/translation.adoc[]
6c64d12d 81endif::[]