From d949bcabb08243f7f3a56cea96d9ed58181438d5 Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Sun, 11 May 2025 14:00:42 +0300 Subject: [PATCH] systemd*: add option placeholders and remove `=` (#16448) --- pages/linux/systemd-ac-power.md | 2 +- pages/linux/systemd-cgls.md | 2 +- pages/linux/systemd-cgtop.md | 4 ++-- pages/linux/systemd-creds.md | 8 ++++---- pages/linux/systemd-delta.md | 2 +- pages/linux/systemd-detect-virt.md | 6 +++--- pages/linux/systemd-dissect.md | 6 +++--- pages/linux/systemd-escape.md | 4 ++-- pages/linux/systemd-firstboot.md | 10 +++++----- pages/linux/systemd-hwdb.md | 4 ++-- pages/linux/systemd-id128.md | 2 +- pages/linux/systemd-machine-id-setup.md | 6 +++--- pages/linux/systemd-mount.md | 8 ++++---- pages/linux/systemd-notify.md | 2 +- pages/linux/systemd-nspawn.md | 8 ++++---- pages/linux/systemd-repart.md | 4 ++-- pages/linux/systemd-run.md | 10 +++++----- pages/linux/systemd-socket-activate.md | 2 +- pages/linux/systemd-stdio-bridge.md | 4 ++-- 19 files changed, 47 insertions(+), 47 deletions(-) diff --git a/pages/linux/systemd-ac-power.md b/pages/linux/systemd-ac-power.md index a17cf26f15..75154ff66b 100644 --- a/pages/linux/systemd-ac-power.md +++ b/pages/linux/systemd-ac-power.md @@ -9,4 +9,4 @@ - Additionally print `yes` or `no` to `stdout`: -`systemd-ac-power --verbose` +`systemd-ac-power {{[-v|--verbose]}}` diff --git a/pages/linux/systemd-cgls.md b/pages/linux/systemd-cgls.md index e7ca91c2ba..7313ce68d3 100644 --- a/pages/linux/systemd-cgls.md +++ b/pages/linux/systemd-cgls.md @@ -13,4 +13,4 @@ - Display the control group hierarchy of one or more systemd units: -`systemd-cgls --unit {{unit1 unit2 ...}}` +`systemd-cgls {{[-u|--unit]}} {{unit1 unit2 ...}}` diff --git a/pages/linux/systemd-cgtop.md b/pages/linux/systemd-cgtop.md index afae6a4d50..62c3f76ca5 100644 --- a/pages/linux/systemd-cgtop.md +++ b/pages/linux/systemd-cgtop.md @@ -10,11 +10,11 @@ - Change the sort order: -`systemd-cgtop --order={{cpu|memory|path|tasks|io}}` +`systemd-cgtop {{[-i|--order]}} {{cpu|memory|path|tasks|io}}` - Show the CPU usage by time instead of percentage: -`systemd-cgtop --cpu=percentage` +`systemd-cgtop --cpu percentage` - Change the update interval in seconds (or one of these time units: `ms`, `us`, `min`): diff --git a/pages/linux/systemd-creds.md b/pages/linux/systemd-creds.md index 16a326cf6d..2d443ae30d 100644 --- a/pages/linux/systemd-creds.md +++ b/pages/linux/systemd-creds.md @@ -5,7 +5,7 @@ - Encrypt a file and set a specific name: -`systemd-creds encrypt --name={{name}} {{path/to/input_file}} {{path/to/output}}` +`systemd-creds encrypt --name {{name}} {{path/to/input_file}} {{path/to/output}}` - Decrypt the file again: @@ -13,12 +13,12 @@ - Encrypt text from `stdin`: -`echo -n {{text}} | systemd-creds encrypt --name={{name}} - {{path/to/output}}` +`echo -n {{text}} | systemd-creds encrypt --name {{name}} - {{path/to/output}}` - Encrypt the text and append it to the service file (the credentials will be available in `$CREDENTIALS_DIRECTORY`): -`echo -n {{text}} | systemd-creds encrypt --name={{name}} --pretty - - >> {{service}}` +`echo -n {{text}} | systemd-creds encrypt --name {{name}} --pretty - - >> {{service}}` - Create a credential that is only valid until the given timestamp: -`systemd-creds encrypt --not-after="{{timestamp}}" {{path/to/input_file}} {{path/to/output_file}}` +`systemd-creds encrypt --not-after "{{timestamp}}" {{path/to/input_file}} {{path/to/output_file}}` diff --git a/pages/linux/systemd-delta.md b/pages/linux/systemd-delta.md index 786306fa8a..5bef1cf3a7 100644 --- a/pages/linux/systemd-delta.md +++ b/pages/linux/systemd-delta.md @@ -9,7 +9,7 @@ - Show only files of specific types (comma-separated list): -`systemd-delta --type {{masked|equivalent|redirected|overridden|extended|unchanged}}` +`systemd-delta {{[-t|--type]}} {{masked|equivalent|redirected|overridden|extended|unchanged}}` - Show only files whose path starts with the specified prefix (Note: A prefix is a directory containing subdirectories with systemd configuration files): diff --git a/pages/linux/systemd-detect-virt.md b/pages/linux/systemd-detect-virt.md index 140e27a943..1719d024f9 100644 --- a/pages/linux/systemd-detect-virt.md +++ b/pages/linux/systemd-detect-virt.md @@ -13,12 +13,12 @@ - Silently check without printing anything: -`systemd-detect-virt --quiet` +`systemd-detect-virt {{[-q|--quiet]}}` - Only detect container virtualization: -`systemd-detect-virt --container` +`systemd-detect-virt {{[-c|--container]}}` - Only detect hardware virtualization: -`systemd-detect-virt --vm` +`systemd-detect-virt {{[-v|--vm]}}` diff --git a/pages/linux/systemd-dissect.md b/pages/linux/systemd-dissect.md index 11d52b386b..c9e3a84562 100644 --- a/pages/linux/systemd-dissect.md +++ b/pages/linux/systemd-dissect.md @@ -9,15 +9,15 @@ - Mount an OS image: -`systemd-dissect --mount {{path/to/image.raw}} {{/mnt/image}}` +`systemd-dissect {{[-m|--mount]}} {{path/to/image.raw}} {{/mnt/image}}` - Unmount an OS image: -`systemd-dissect --umount {{/mnt/image}}` +`systemd-dissect {{[-u|--umount]}} {{/mnt/image}}` - List files in an image: -`systemd-dissect --list {{path/to/image.raw}}` +`systemd-dissect {{[-l|--list]}} {{path/to/image.raw}}` - Attach an OS image to an automatically allocated loopback block device and print its path: diff --git a/pages/linux/systemd-escape.md b/pages/linux/systemd-escape.md index cc6e7630b5..529ab8eba5 100644 --- a/pages/linux/systemd-escape.md +++ b/pages/linux/systemd-escape.md @@ -9,11 +9,11 @@ - Reverse the escaping process: -`systemd-escape --unescape {{text}}` +`systemd-escape {{[-u|--unescape]}} {{text}}` - Treat the given text as a path: -`systemd-escape --path {{text}}` +`systemd-escape {{[-p|--path]}} {{text}}` - Append the given suffix to the escaped text: diff --git a/pages/linux/systemd-firstboot.md b/pages/linux/systemd-firstboot.md index 5eba8692f4..11c1563df3 100644 --- a/pages/linux/systemd-firstboot.md +++ b/pages/linux/systemd-firstboot.md @@ -5,23 +5,23 @@ - Operate on the specified directory instead of the root directory of the host system: -`sudo systemd-firstboot --root={{path/to/root_directory}}` +`sudo systemd-firstboot --root {{path/to/root_directory}}` - Set the system keyboard layout: -`sudo systemd-firstboot --keymap={{keymap}}` +`sudo systemd-firstboot --keymap {{keymap}}` - Set the system hostname: -`sudo systemd-firstboot --hostname={{hostname}}` +`sudo systemd-firstboot --hostname {{hostname}}` - Set the root user's password: -`sudo systemd-firstboot --root-password={{password}}` +`sudo systemd-firstboot --root-password {{password}}` - Prompt the user interactively for a specific basic setting: -`sudo systemd-firstboot --prompt={{setting}}` +`sudo systemd-firstboot --prompt {{setting}}` - Force writing configuration even if the relevant files already exist: diff --git a/pages/linux/systemd-hwdb.md b/pages/linux/systemd-hwdb.md index 12f17c4517..95da284f55 100644 --- a/pages/linux/systemd-hwdb.md +++ b/pages/linux/systemd-hwdb.md @@ -13,7 +13,7 @@ - Update the binary hardware database, returning a non-zero exit value on any parsing error: -`systemd-hwdb --strict update` +`systemd-hwdb {{[-s|--strict]}} update` - Update the binary hardware database in `/usr/lib/udev`: @@ -21,4 +21,4 @@ - Update the binary hardware database in the specified root path: -`systemd-hwdb --root={{path/to/root}} update` +`systemd-hwdb {{[-r|--root]}} {{path/to/root}} update` diff --git a/pages/linux/systemd-id128.md b/pages/linux/systemd-id128.md index 285016c3cb..26f4e62210 100644 --- a/pages/linux/systemd-id128.md +++ b/pages/linux/systemd-id128.md @@ -21,4 +21,4 @@ - Generate a new random identifier and print it as a UUID (five groups of digits separated by hyphens): -`systemd-id128 new --uuid` +`systemd-id128 new {{[-u|--uuid]}}` diff --git a/pages/linux/systemd-machine-id-setup.md b/pages/linux/systemd-machine-id-setup.md index 49e873f471..122a05a4b2 100644 --- a/pages/linux/systemd-machine-id-setup.md +++ b/pages/linux/systemd-machine-id-setup.md @@ -10,12 +10,12 @@ - Specify an image policy: -`systemd-machine-id-setup --image-policy={{your_policy}}` +`systemd-machine-id-setup --image-policy {{your_policy}}` - Display the output as JSON: -`sudo systemd-machine-id-setup --json=pretty` +`sudo systemd-machine-id-setup --json pretty` - Operate on a disk image instead of a directory tree: -`systemd-machine-id-setup --image={{/path/to/image}}` +`systemd-machine-id-setup --image {{/path/to/image}}` diff --git a/pages/linux/systemd-mount.md b/pages/linux/systemd-mount.md index c185860514..39593efa0f 100644 --- a/pages/linux/systemd-mount.md +++ b/pages/linux/systemd-mount.md @@ -17,16 +17,16 @@ - Create an automount point that mounts the actual file system at the time of first access: -`systemd-mount --automount=yes {{path/to/file_or_device}}` +`systemd-mount --automount yes {{path/to/file_or_device}}` - Unmount one or more devices: -`systemd-mount --umount {{path/to/mount_point_or_device1}} {{path/to/mount_point_or_device2}}` +`systemd-mount {{[-u|--umount]}} {{path/to/mount_point_or_device1}} {{path/to/mount_point_or_device2}}` - Mount a file system (image or block device) with a specific file system type: -`systemd-mount --type={{file_system_type}} {{path/to/file_or_device}} {{path/to/mount_point}}` +`systemd-mount {{[-t|--type]}} {{file_system_type}} {{path/to/file_or_device}} {{path/to/mount_point}}` - Mount a file system (image or block device) with additional mount options: -`systemd-mount --options={{mount_options}} {{path/to/file_or_device}} {{path/to/mount_point}}` +`systemd-mount {{[-o|--options]}} {{mount_options}} {{path/to/file_or_device}} {{path/to/mount_point}}` diff --git a/pages/linux/systemd-notify.md b/pages/linux/systemd-notify.md index 19a5288154..a9ee43c7c3 100644 --- a/pages/linux/systemd-notify.md +++ b/pages/linux/systemd-notify.md @@ -14,4 +14,4 @@ - Provide a custom status message to systemd (this information is shown by `systemctl status`): -`systemd-notify --status="{{Add custom status message here...}}"` +`systemd-notify --status "{{Add custom status message here...}}"` diff --git a/pages/linux/systemd-nspawn.md b/pages/linux/systemd-nspawn.md index a2f7cc53a6..ddc84bbaab 100644 --- a/pages/linux/systemd-nspawn.md +++ b/pages/linux/systemd-nspawn.md @@ -5,16 +5,16 @@ - Run a command in a container: -`systemd-nspawn --directory {{path/to/container_root}}` +`systemd-nspawn {{[-D|--directory]}} {{path/to/container_root}}` - Run a full Linux-based OS in a container: -`systemd-nspawn --boot --directory {{path/to/container_root}}` +`systemd-nspawn {{[-b|--boot]}} {{[-D|--directory]}} {{path/to/container_root}}` - Run the specified command as PID 2 in the container (as opposed to PID 1) using a stub init process: -`systemd-nspawn --directory {{path/to/container_root}} --as-pid2` +`systemd-nspawn {{[-D|--directory]}} {{path/to/container_root}} {{[-a|--as-pid2]}}` - Specify the machine name and hostname: -`systemd-nspawn --machine={{container_name}} --hostname={{container_host}} --directory {{path/to/container_root}}` +`systemd-nspawn {{[-M|--machine]}} {{container_name}} --hostname {{container_host}} {{[-D|--directory]}} {{path/to/container_root}}` diff --git a/pages/linux/systemd-repart.md b/pages/linux/systemd-repart.md index 706ffe6d13..c4e4ee98d5 100644 --- a/pages/linux/systemd-repart.md +++ b/pages/linux/systemd-repart.md @@ -11,8 +11,8 @@ - View changes without applying: -`systemd-repart --dry-run=yes` +`systemd-repart --dry-run yes` - Grow root partition size to 10 gigabytes: -`systemd-repart --size=10G --root /` +`systemd-repart --size 10G --root /` diff --git a/pages/linux/systemd-run.md b/pages/linux/systemd-run.md index 0ffca042a7..f9fe44c56f 100644 --- a/pages/linux/systemd-run.md +++ b/pages/linux/systemd-run.md @@ -13,11 +13,11 @@ - Start a transient service with a custom unit name and description: -`sudo systemd-run --unit={{name}} --description={{string}} {{command}} {{argument1 argument2 ...}}` +`sudo systemd-run {{[-u|--unit]}} {{name}} --description {{string}} {{command}} {{argument1 argument2 ...}}` - Start a transient service that does not get cleaned up after it terminates with a custom environment variable: -`sudo systemd-run --remain-after-exit --set-env={{name}}={{value}} {{command}} {{argument1 argument2 ...}}` +`sudo systemd-run {{[-r|--remain-after-exit]}} --set-env={{name}}={{value}} {{command}} {{argument1 argument2 ...}}` - Start a transient timer that periodically runs its transient service (see `man systemd.time` for calendar event format): @@ -25,12 +25,12 @@ - Share the terminal with the program (allowing interactive input/output) and make sure the execution details remain after the program exits: -`systemd-run --remain-after-exit --pty {{command}}` +`systemd-run {{[-r|--remain-after-exit]}} --pty {{command}}` - Set properties (e.g. CPUQuota, MemoryMax) of the process and wait until it exits: -`systemd-run --property MemoryMax={{memory_in_bytes}} --property CPUQuota={{percentage_of_CPU_time}}% --wait {{command}}` +`systemd-run {{[-p|--property]}} MemoryMax={{memory_in_bytes}} {{[-p|--property]}} CPUQuota={{percentage_of_CPU_time}}% --wait {{command}}` - Use the program in a shell pipeline: -`{{command1}} | systemd-run --pipe {{command2}} | {{command3}}` +`{{command1}} | systemd-run {{[-P|--pipe]}} {{command2}} | {{command3}}` diff --git a/pages/linux/systemd-socket-activate.md b/pages/linux/systemd-socket-activate.md index 282245a904..9a4fcd7e83 100644 --- a/pages/linux/systemd-socket-activate.md +++ b/pages/linux/systemd-socket-activate.md @@ -21,4 +21,4 @@ - Activate a service with a specified port: -`systemd-socket-activate {{path/to/socket.service}} {{{[-l|--listen]}}} {{8080}}` +`systemd-socket-activate {{path/to/socket.service}} {{[-l|--listen]}} {{8080}}` diff --git a/pages/linux/systemd-stdio-bridge.md b/pages/linux/systemd-stdio-bridge.md index e96569bfd4..19c5ce84be 100644 --- a/pages/linux/systemd-stdio-bridge.md +++ b/pages/linux/systemd-stdio-bridge.md @@ -14,8 +14,8 @@ - Forward `stdin`/`stdout` to the local system bus within a specific container: -`systemd-stdio-bridge --machine={{mycontainer}}` +`systemd-stdio-bridge {{[-M|--machine]}} {{mycontainer}}` - Forward `stdin`/`stdout` to a custom D-Bus address: -`systemd-stdio-bridge --bus-path=unix:path={{/custom/dbus/socket}}` +`systemd-stdio-bridge {{[-p|--bus-path]}} unix:path={{/custom/dbus/socket}}`