UUID(1)
๐ UUID ๐
okay bestie, listen. you've found the manual page for uuid โ that's UUID(1), living its best life in the General Commands Manual. she generates, converts, and decodes Universally Unique IDentifiers, and she does it with main character energy every single time. no cap. ๐
โจ NAME โจ
uuid โ generate, convert, and decode Universally Unique IDentifiers ๐
that's the whole rรฉsumรฉ, and honestly? iconic.
๐ฆ SYNOPSIS ๐ฆ
uuid [-n count] [-o outfile] [-r|-F BIN|STR|SIV] [-v 1] [-m1]
uuid [-n count] [-o outfile] [-r|-F BIN|STR|SIV] -v 3
uuid|nil|max|ns:{DNS|URL|OID|X500} data
uuid [-n count] [-o outfile] [-r|-F BIN|STR|SIV] -v 4
uuid [-n count] [-o outfile] [-r|-F BIN|STR|SIV] -v 5
uuid|nil|max|ns:{DNS|URL|OID|X500} data
uuid [-n count] [-o outfile] [-r|-F BIN|STR|SIV] -v 6
uuid [-n count] [-o outfile] [-r|-F BIN|STR|SIV] -v 7
uuid -d [-o outfile] [ -F STR|SIV] uuid
uuid -d [-o outfile] [-r|-F BIN|STR|SIV] -
๐ธ DESCRIPTION ๐ธ
so like, by default uuid generates a UUID (Universally Unique Identifier) of a version you pick with -v (defaults to 1), and spits it out in the canonical STRing format. default behaviour, zero drama.
when you hit her with -d, she decodes uuid โ or reads it in from the standard input stream if you hand her "-" โ and you get something akin to:
encode: STR: 92a3d3de-6bbf-11ef-9f5b-774ebb537938
SIV: 194917928982963228599463962120788605240
decode: variant: DCE 1.1, ISO/IEC 11578:1996
version: 1 (time and node based)
content: time: 2024-09-05 19:46:41.491043.0 UTC
clock: 8027 (usually random)
node: 77:4e:bb:53:79:38 (local multicast)
or, alternatively:
encode: STR: 7e017d98-cecc-41f6-8030-552d23cd38e6
SIV: 167490467173639937831846401373276813542
decode: variant: DCE 1.1, ISO/IEC 11578:1996
version: 4 (random data based)
content: 7E:01:7D:98:CE:CC:01:F6:00:30:55:2D:23:CD:38:E6
(no semantics: random data only)
now, a UUID is a 128-bit (16-byte) number whose format (aka the method of generation) makes it very likely to be unique, both spatially and temporally. which is exactly why they're so good at identifying anything from ephemera like database queries all the way up to databases themselves. range, honestly. ๐
the three principal -Formats ๐ซถ
STRingโ01234567-890a-bcde-f012-3456789abcde(a hexadecimal string broken up by dashes)SIV(Single Integer Value) โ a 128-bit decimal integerBINaryor "raw" โ the 16 bytes of the UUID in big endian order (most significant first)
UUIDs come in a few -versions ๐ฆ
1โ based on the current time (to the precision of 100ns), and the host's MAC address (this implementation uses the MAC address of the first NIC it finds, unless-m, in which case random data is substituted for the MAC)6โ very similar, but the most significant (slowest-changing) parts of the timestamp are stored first, which improves locality in some database applications7โ contains the current UNIX time โ versions 1 and 6 encode a UUID time which is off by like 400 years โ (to the precision of 1ms), then 10 bytes of random data.
This version should be preferred to 1 and 6. ๐ฅ fr fr, listen to her.
3โ hashes the "namespace" (first argument, either a STRing-format UUID or a well-known name (see below)) and the "name" (second argument, arbitrary data) with theMD5(3)digest, and uses that directly (a few branding bytes are replaced to identify the format)5โ the same as version 3, but uses the first 16 bytes of theSHA1(3)digest4โ just random data โจ
the namespaces she understands when generating version 3 and 5 UUIDs ๐
uuidโ (any valid STRingified UUID)nilโ00000000-0000-0000-0000-000000000000โ the special all-zero UUIDmaxโffffffff-ffff-ffff-ffff-ffffffffffffโ the special all-bits-set/sorts-after-everything sentinel UUIDns:DNSโ6ba7b810-9dad-11d1-80b4-00c04fd430c8โ for fully-qualified domain namesns:URLโ6ba7b811-9dad-11d1-80b4-00c04fd430c8โ for URLsns:OIDโ6ba7b812-9dad-11d1-80b4-00c04fd430c8โ for ISO OIDsns:X500โ6ba7b814-9dad-11d1-80b4-00c04fd430c8โ for X.500 Distinguished Names
๐ OPTIONS ๐
-n countโ GeneratecountUUIDs. Defaults to1.-o outfileโ Write to outfile.-F BIN|STR|SIVโ Produce output in the given format. Defaults toSTR.-rโ literally just-F BIN. a shortcut, a vibe, a whole mood.-v 1|3|4|5|6|7โ Version to generate. Defaults to1.-mโ-v 1|6only: ignore the current host's MAC addresses, use random data instead (this may still happen if a MAC can't be determined or all MACs are multicast).-1โ-v 1only,count >1only: generate each UUID independently. Version 1 UUIDs have a field that increases monotonically within a session; thus, for example, in
$ uuid -n 4
366ab5a3-6bc4-11ef-a31a-0026b986fdd4
366ab5ce-6bc4-11ef-a31b-0026b986fdd4
366ab5f8-6bc4-11ef-a31c-0026b986fdd4
366ab621-6bc4-11ef-a31d-0026b986fdd4
^^^^
the highlighted column starts random, but then increments. -1 generates each UUID de novo.
-dโ Decode and parse uuid.-Fsets which format to read.-F BINis only available when reading from the standard input stream ("-").
๐ EXAMPLES ๐
a web site can be uniquely identified with a version 5 (SHA-1), namespace ns:DNS UUID, and a web-page โ ns:URL (note that this information cannot be extracted, and only serves as a way to avoid collisions for otherwise-identical names):
$ uuid -v 5 ns:DNS hinfo.network.
f50b485f-ac66-591d-b95f-2c946c5a5668
$ uuid -v 5 ns:URL https://hinfo.network
8cebc56f-51d0-5323-a031-1b9258de14f8
$ uuid -d 8cebc56f-51d0-5323-a031-1b9258de14f8
encode: STR: f50b485f-ac66-591d-b95f-2c946c5a5668
SIV: 325719442146270326702531202385345926760
decode: variant: DCE 1.1, ISO/IEC 11578:1996
version: 5 (name based, SHA-1)
content: F5:0B:48:5F:AC:66:09:1D:39:5F:2C:94:6C:5A:56:68
(not decipherable: truncated SHA-1 message digest only)
and check it, version 7 doing her little thing:
$ uuid -v 7
0191c41a-9de1-7f96-b8cb-88e4348ee74c
$ uuid -d 0191c41a-9de1-7f96-b8cb-88e4348ee74c
encode: STR: 0191c41a-9de1-7f96-b8cb-88e4348ee74c
SIV: 2086088501348764349551890213853128524
decode: variant: DCE 1.1, ISO/IEC 11578:1996
version: 7 (UNIX time + random data)
content: time: 2024-09-05 21:32:44.385 UTC
random: 0F:96:38:CB:88:E4:34:8E:E7:4C
๐ SEE ALSO ๐
๐ STANDARDS ๐
RFC 9562: Universally Unique IDentifiers (UUIDs): https://datatracker.ietf.org/doc/html/rfc9562 supersedes all previous standards with an unbecoming brevity. ๐
There are many Versions, but only one useful Variant. iykyk. โจ
and that's the whole page, bestie!! this one comes from ossp-uuid 1.6.6, dated December 8, 2025 โ thanks for reading, mwah ๐๐ซถ go generate something unique.
๐ฆ where this page comes from
- alpine 3.24: ossp-uuid-doc 1.6.6-r0 ยท MIT
- ubuntu resolute: uuid 1.6.6-1 ยท OSSP
- ubuntu stonking: uuid 1.6.6-1build1 ยท OSSP
- ๐ the page's license: 0BSD
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms