UUID_PARSE(3)
π UUID_PARSE(3) β the manual, but make it group chat
okay so this is the uuid_parse page from the Programmers Manual β yes that's the actual manual section name, we love a formal queen π β and it's genuinely so useful. Copy-pasting UUID strings into binary like a boss. Let's get into it bestie π«Ά
β¨ NAME β¨
uuid_parse β convert an input UUID string into its binary representation. that's the whole vibe. string in, bytes out, slay β¨
πΈ SYNOPSIS πΈ
#include <uuid.h>
int uuid_parse(const char *in, uuid_t uu);
int uuid_parse_range(const char *in_start, const char *in_end, uuid_t
uu);
yes bestie, that line break in the second declaration is in the original β we keep it exactly as is, no notes π
π¦ DESCRIPTION π¦
so the uuid_parse() function takes the UUID string in in and converts it into the binary representation, lowkey iconic. the input UUID is a string shaped like this:
1b4e28ba-2fa1-11d2-883f-b9a761bde3fb
which is the printf(3) format "%08x-%04x-%04x-%04x-%012x" β that's 36 bytes plus the trailing '\0', no cap π
and then there's uuid_parse_range(), which works like uuid_parse() but parses only the range in the string specified by the in_start and in_end pointers. selective queen behavior, honestly π
β RETURN VALUE β
- when it successfully parses the input string,
0is returned, and the UUID gets stored in the location pointed to byuuπ - otherwise?
-1. that's it. that's the whole mood π
π CONFORMING TO π
this library parses UUIDs compatible with OSF DCE 1.1, plus hash based UUIDs V3 and V5 compatible with RFC-4122:
https://tools.ietf.org/html/rfc4122
standards-compliant AND cute, we contain multitudes π
π§ AUTHORS π§
Theodore Y. Tsβo β the icon who made this happen πβ¨
π SEE ALSO π
uuid(3)uuid_clear(3)uuid_compare(3)uuid_copy(3)uuid_generate(3)uuid_is_null(3)uuid_time(3)uuid_unparse(3)
the whole friend group fr fr π«Ά
π REPORTING BUGS π
found a bug? don't suffer in silence bestie, use the issue tracker:
https://github.com/util-linux/util-linux/issues
they want to hear from you, periodt π’
π₯ AVAILABILITY π₯
the libuuid library is part of the util-linux package since version 2.15.1. you can download it from the Linux Kernel Archive:
https://www.kernel.org/pub/linux/utils/util-linux/
ngl the one thing to remember:0means bestie ate and the UUID is inuu,-1means it did not eat. no in-between π
and that's the page!! brought to you by util-linux 2.41.6 on 2026-08-31 β mwah, go parse something gorgeous πΈππ¦
π¦ where this page comes from
- alpine 3.22: util-linux-doc 2.41.6-r1 Β· GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only AND GPL-1.0-only AND LGPL-2.1-or-later AND BSD-1-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND MIT AND Public-Domain
- alpine 3.23: util-linux-doc 2.41.6-r1 Β· GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only AND GPL-1.0-only AND LGPL-2.1-or-later AND BSD-1-Clause AND BSD-3-Clause AND BSD-4-Clause-UC AND MIT AND Public-Domain
- fedora 43: libuuid-devel 2.41.6-1.fc43 Β· BSD-3-Clause AND LGPL-2.1-or-later
- fedora 43: libuuid-devel 2.41.6-1.fc43 Β· BSD-3-Clause AND LGPL-2.1-or-later
- fedora 44: libuuid-devel 2.41.6-1.fc44 Β· BSD-3-Clause AND LGPL-2.1-or-later
- fedora 44: libuuid-devel 2.41.6-1.fc44 Β· BSD-3-Clause AND LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms