← 返回命令列表

Linux command

systemd-id128 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Generate

systemd-id128 new

Print

systemd-id128 machine-id

Print

systemd-id128 boot-id

Print

systemd-id128 invocation-id

Generate

systemd-id128 new --uuid

Generate

systemd-id128 machine-id --app-specific [app-id]

Show well-known identifiers

systemd-id128 show

说明

systemd-id128 generates and prints sd-id128 identifiers used by systemd. These 128-bit identifiers uniquely identify machines, boots, and service invocations. The machine ID is persistent across reboots and stored in /etc/machine-id. The boot ID changes each boot and identifies the current system session. The invocation ID is unique per service start.

参数

new
Generate a new random identifier.
machine-id
Print the machine ID from /etc/machine-id.
boot-id
Print the current boot ID.
invocation-id
Print the service invocation ID (systemd services only).
show _NAME_|_UUID_...
Display well-known systemd identifiers.
-u, --uuid
Print in UUID format with hyphen-separated groups.
-p, --pretty
Generate output as programming language snippets.
-P, --value
Only print the identifier value.
-a, --app-specific _APP-ID_
Generate an application-specific ID by hashing the machine or boot ID with the given application ID.
--json=_MODE_
Output in JSON format. MODE is short, pretty, or off.
--no-pager
Disable pager output.
--no-legend
Omit column headers and footer with show command.

FAQ

What is the systemd-id128 command used for?

systemd-id128 generates and prints sd-id128 identifiers used by systemd. These 128-bit identifiers uniquely identify machines, boots, and service invocations. The machine ID is persistent across reboots and stored in /etc/machine-id. The boot ID changes each boot and identifies the current system session. The invocation ID is unique per service start.

How do I run a basic systemd-id128 example?

Run `systemd-id128 new` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does new do in systemd-id128?

Generate a new random identifier.