{
    "mode": "man",
    "parameter": "systemd-id128",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/systemd-id128/1/json",
    "generated": "2026-06-16T06:21:12Z",
    "synopsis": "systemd-id128 [OPTIONS...] new\nsystemd-id128 [OPTIONS...] machine-id\nsystemd-id128 [OPTIONS...] boot-id\nsystemd-id128 [OPTIONS...] invocation-id",
    "sections": {
        "NAME": {
            "content": "systemd-id128 - Generate and print sd-128 identifiers\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "systemd-id128 [OPTIONS...] new\n\nsystemd-id128 [OPTIONS...] machine-id\n\nsystemd-id128 [OPTIONS...] boot-id\n\nsystemd-id128 [OPTIONS...] invocation-id\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "id128 may be used to conveniently print sd-id128(3) UUIDs. What identifier is printed depends\non the specific verb.\n\nWith new, a new random identifier will be generated.\n\nWith machine-id, the identifier of the current machine will be printed. See machine-id(5).\n\nWith boot-id, the identifier of the current boot will be printed.\n\nBoth machine-id and boot-id may be combined with the --app-specific=app-id switch to generate\napplication-specific IDs. See sdid128getmachine(3) for the discussion when this is useful.\n\nWith invocation-id, the identifier of the current service invocation will be printed. This is\navailable in systemd services. See systemd.exec(5).\n\nWith show, well-known UUIDs are printed. When no arguments are specified, all known UUIDs are\nshown. When arguments are specified, they must be the names or values of one or more known\nUUIDs, which are then printed.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "The following options are understood:\n",
            "subsections": [
                {
                    "name": "-p --pretty",
                    "content": "Generate output as programming language snippets.\n",
                    "flag": "-p",
                    "long": "--pretty"
                },
                {
                    "name": "-a --app-specific=",
                    "content": "With this option, an identifier that is the result of hashing the application identifier\napp-id and the machine identifier will be printed. The app-id argument must be a valid\nsd-id128 string identifying the application.\n",
                    "flag": "-a"
                },
                {
                    "name": "-u --uuid",
                    "content": "Generate output as an UUID formatted in the \"canonical representation\", with five groups\nof digits separated by hyphens. See the wikipedia[1] for more discussion.\n",
                    "flag": "-u",
                    "long": "--uuid"
                },
                {
                    "name": "-h --help",
                    "content": "Print a short help text and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "--version",
                    "content": "Print a short version string and exit.\n",
                    "long": "--version"
                }
            ]
        },
        "EXIT STATUS": {
            "content": "On success, 0 is returned, a non-zero failure code otherwise.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "systemd(1), sd-id128(3), sdid128getmachine(3)\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. wikipedia\nhttps://en.wikipedia.org/wiki/Universallyuniqueidentifier#Format\n\n\n\nsystemd 249                                                                         SYSTEMD-ID128(1)",
            "subsections": []
        }
    },
    "summary": "systemd-id128 - Generate and print sd-128 identifiers",
    "flags": [
        {
            "flag": "-p",
            "long": "--pretty",
            "arg": null,
            "description": "Generate output as programming language snippets."
        },
        {
            "flag": "-a",
            "long": null,
            "arg": null,
            "description": "With this option, an identifier that is the result of hashing the application identifier app-id and the machine identifier will be printed. The app-id argument must be a valid sd-id128 string identifying the application."
        },
        {
            "flag": "-u",
            "long": "--uuid",
            "arg": null,
            "description": "Generate output as an UUID formatted in the \"canonical representation\", with five groups of digits separated by hyphens. See the wikipedia[1] for more discussion."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Print a short help text and exit."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Print a short version string and exit."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "systemd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
        },
        {
            "name": "sd-id128",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/sd-id128/3/json"
        },
        {
            "name": "sdid128getmachine",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/sdid128getmachine/3/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Generate and print sd-128 identifiers.",
        "examples": [
            {
                "description": "Generate a new random identifier",
                "command": "systemd-id128 new"
            },
            {
                "description": "Print the identifier of the current machine",
                "command": "systemd-id128 machine-id"
            },
            {
                "description": "Print the identifier of the current boot",
                "command": "systemd-id128 boot-id"
            },
            {
                "description": "Print the identifier of the current service invocation (this is available in systemd services)",
                "command": "systemd-id128 invocation-id"
            },
            {
                "description": "Generate a new random identifier and print it as a UUID (five groups of digits separated by hyphens)",
                "command": "systemd-id128 new {{-u|--uuid}}"
            }
        ]
    }
}