1UUIDGEN(1)                       User Commands                      UUIDGEN(1)
2
3
4

NAME

6       uuidgen - create a new UUID value
7

SYNOPSIS

9       uuidgen [options]
10

DESCRIPTION

12       The uuidgen program creates (and prints) a new universally unique
13       identifier (UUID) using the libuuid(3) library. The new UUID can
14       reasonably be considered unique among all UUIDs created on the local
15       system, and among UUIDs created on other systems in the past and in the
16       future.
17
18       There are three types of UUIDs which uuidgen can generate: time-based
19       UUIDs, random-based UUIDs, and hash-based UUIDs. By default uuidgen
20       will generate a random-based UUID if a high-quality random number
21       generator is present. Otherwise, it will choose a time-based UUID. It
22       is possible to force the generation of one of these first two UUID
23       types by using the --random or --time options.
24
25       The third type of UUID is generated with the --md5 or --sha1 options,
26       followed by --namespace namespace and --name name. The namespace may
27       either be a well-known UUID, or else an alias to one of the well-known
28       UUIDs defined in RFC 4122, that is @dns, @url, @oid, or @x500. The name
29       is an arbitrary string value. The generated UUID is the digest of the
30       concatenation of the namespace UUID and the name value, hashed with the
31       MD5 or SHA1 algorithms. It is, therefore, a predictable value which may
32       be useful when UUIDs are being used as handles or nonces for more
33       complex values or values which shouldn’t be disclosed directly. See the
34       RFC for more information.
35

OPTIONS

37       -r, --random
38           Generate a random-based UUID. This method creates a UUID consisting
39           mostly of random bits. It requires that the operating system has a
40           high quality random number generator, such as /dev/random.
41
42       -t, --time
43           Generate a time-based UUID. This method creates a UUID based on the
44           system clock plus the system’s ethernet hardware address, if
45           present.
46
47       -h, --help
48           Display help text and exit.
49
50       -V, --version
51           Print version and exit.
52
53       -m, --md5
54           Use MD5 as the hash algorithm.
55
56       -s, --sha1
57           Use SHA1 as the hash algorithm.
58
59       -n, --namespace namespace
60           Generate the hash with the namespace prefix. The namespace is UUID,
61           or '@ns' where "ns" is well-known predefined UUID addressed by
62           namespace name (see above).
63
64       -N, --name name
65           Generate the hash of the name.
66
67       -x, --hex
68           Interpret name name as a hexadecimal string.
69

CONFORMING TO

71       OSF DCE 1.1
72

EXAMPLES

74       uuidgen --sha1 --namespace @dns --name "www.example.com"
75

AUTHORS

77       uuidgen was written by Andreas Dilger for libuuid(3).
78

SEE ALSO

80       uuidparse(1), libuuid(3), RFC 4122
81       <https://tools.ietf.org/html/rfc4122>
82

REPORTING BUGS

84       For bug reports, use the issue tracker at
85       https://github.com/util-linux/util-linux/issues.
86

AVAILABILITY

88       The uuidgen command is part of the util-linux package which can be
89       downloaded from Linux Kernel Archive
90       <https://www.kernel.org/pub/linux/utils/util-linux/>.
91
92
93
94util-linux 2.38                   2022-02-17                        UUIDGEN(1)
Impressum