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. peek machine-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. check systemd.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 --uuid to 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 valid sd-id128 string identifying the application. when used with machine-id, the other ID will be the machine ID as described in machine-id(5); when used with boot-id, the other ID will be the boot ID; and when used with show, 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=pretty if running on a terminal, and --json=short otherwise.
  • -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 ๐Ÿ“

  1. UAPI.2 Discoverable Partitions Specification https://uapi-group.org/specifications/specs/discoverable_partitions_specification
  2. 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