SYSTEMD-ID128(1)
โจ SYSTEMD-ID128 โจ
okay bestie, buckle UP, because this is the manual page for systemd-id128 ๐ it lives in the systemd-id128 corner of your manual, and it's literally just here to generate and print sd-128 identifiers. that's it. that's the gig. and it EATS. ๐
๐ฆ NAME ๐ฆ
systemd-id128 โ generate and print sd-128 identifiers
๐ธ SYNOPSIS ๐ธ
systemd-id128 [OPTIONS...] new
systemd-id128 [OPTIONS...] machine-id
systemd-id128 [OPTIONS...] boot-id
systemd-id128 [OPTIONS...] invocation-id
systemd-id128 [OPTIONS...] var-partition-uuid
systemd-id128 [OPTIONS...] show [NAME|UUID...]
โจ DESCRIPTION โจ
so id128 is your bestie for conveniently printing out sd-id128(3) UUIDs ๐ and which identifier you actually get depends on which verb you hand it. main character energy per verb, honestly.
- with
new, it's giving brand new random identifier. freshly generated, no cap. - with
machine-id, it prints the identifier of the current machine. peekmachine-id(5)for the lore. - with
boot-id, you get the identifier of the current boot. slay. - with
invocation-id, you get the identifier of the current service invocation. this one is available in systemd services. checksystemd.exec(5)for more. - with
show, well-known IDs get printed (for now, only GPT partition type UUIDs, okay), along with brief identifier strings. no arguments? then all known IDs show up. arguments? they may be the identifiers or ID values of one or more known IDs โ those get printed with their name โ or arbitrary IDs, which get printed with a placeholder name. combine it with--uuidto list the IDs in UUID style, i.e. the way GPT partition type UUIDs are usually shown. ๐
machine-id, boot-id, and show may all be combined with the --app-specific=app-id switch to generate application-specific IDs ๐ซถ. and if you're wondering when that's actually useful, sd_id128_get_machine(3) has the whole discussion. support for show --app-specific= was added in version 255.
var-partition-uuid prints a UUID which, following the UAPI.2 Discoverable Partitions Specification[1], should be used as the GPT partition UUID for /var/, being derived from the GPT partition type, keyed by the local /etc/machine-id. added in version 257. iconic behavior honestly.
๐ OPTIONS ๐
the following options are understood, bestie, and yes we're going through all of them:
-p,--prettyโ generate output as programming language snippets. ๐ป added in version 240.-P,--valueโ only print the value. may be combined with-u/--uuid. โจ added in version 255.-a app-id,--app-specific=app-idโ with this option, identifiers will be printed that are the result of hashing the application identifier app-id and another ID. the app-id argument must be a validsd-id128string identifying the application. when used withmachine-id, the other ID will be the machine ID as described inmachine-id(5); when used withboot-id, the other ID will be the boot ID; and when used withshow, the other ID or IDs should be specified via the positional arguments. ๐ง added in version 240.-u,--uuidโ generate output as a UUID formatted in the "canonical representation", with five groups of digits separated by hyphens. see the Wikipedia entry for Universally Unique Identifiers[2] for more discussion. ๐ฅ added in version 244.--no-pagerโ do not pipe output into a pager.--no-legendโ do not print the legend, i.e. column headers and the footer with hints. (no legend, no drama ๐ )--json=MODEโ shows output formatted as JSON. expects one of"short"(for the shortest possible output without any redundant whitespace or line breaks),"pretty"(for a pretty version of the same, with indentation and line breaks) or"off"(to turn off JSON output, the default). ๐-jโ equivalent to--json=prettyif running on a terminal, and--json=shortotherwise.-h,--helpโ print a short help text and exit.--versionโ print a short version string and exit.
๐ EXIT STATUS ๐
on success 0 is returned, and a non-zero failure code otherwise. simple as that, bestie. ๐ซถ
๐ EXAMPLES ๐
Example 1. Show a well-known UUID
$ systemd-id128 show --value user-home
773f91ef66d449b5bd83d683bf40ad16
$ systemd-id128 show --value --uuid user-home
773f91ef-66d4-49b5-bd83-d683bf40ad16
$ systemd-id128 show 773f91ef-66d4-49b5-bd83-d683bf40ad16
NAME ID
user-home 773f91ef66d449b5bd83d683bf40ad16
Example 2. Generate an application-specific UUID
$ systemd-id128 machine-id -u
3a9d668b-4db7-4939-8a4a-5e78a03bffb7
$ systemd-id128 new -u
1fb8f24b-02df-458d-9659-cc8ace68e28a
$ systemd-id128 machine-id -u -a 1fb8f24b-02df-458d-9659-cc8ace68e28a
47b82cb1-5339-43da-b2a6-1c350aef1bd1
$ systemd-id128 -Pu show 3a9d668b-4db7-4939-8a4a-5e78a03bffb7 \
-a 1fb8f24b-02df-458d-9659-cc8ace68e28a
47b82cb1-5339-43da-b2a6-1c350aef1bd1
on a given machine with the ID 3a9d668b-4db7-4939-8a4a-5e78a03bffb7, for the application 1fb8f24b-02df-458d-9659-cc8ace68e28a, we generate an application-specific machine ID (47b82cb1-5339-43da-b2a6-1c350aef1bd1) โจ. and if we want to later recreate that exact same calculation on a different machine, we need to specify both IDs explicitly as parameters to show. that's the whole trick, iykyk. ๐
๐ SEE ALSO ๐
systemd(1), sd-id128(3), sd_id128_get_machine(3)
๐ NOTES ๐
- UAPI.2 Discoverable Partitions Specification
https://uapi-group.org/specifications/specs/discoverable_partitions_specification - Universally Unique Identifiers
https://en.wikipedia.org/wiki/Universally_unique_identifier#Format
and that's a wrap, bestie ๐ this whole thing ships as systemd 262.1, SYSTEMD-ID128(1), and you can find it in your manual pages whenever you need it. go print some identifiers, you absolute icon. ๐โจ๐ฆ
๐ฆ where this page comes from
- arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms