From e1fac8a68a0d1fe01edf47e149afb3f232bd75b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 8 Oct 2019 17:58:44 +0200 Subject: [PATCH] Move the Commands section above Options section For executables which take a verb, we should list the verbs first, and then options which modify those verbs second. The general layout of the man page is from general description to specific details, usually Overview, Commands, Options, Return Value, Examples, References. --- man/bootctl.xml | 114 +- man/busctl.xml | 240 +-- man/coredumpctl.xml | 184 +- man/hostnamectl.xml | 66 +- man/localectl.xml | 64 +- man/loginctl.xml | 216 +-- man/machinectl.xml | 428 ++--- man/networkctl.xml | 72 +- man/portablectl.xml | 140 +- man/resolvectl.xml | 218 +-- man/systemctl.xml | 3264 ++++++++++++++++++------------------ man/timedatectl.xml | 140 +- src/boot/bootctl.c | 18 +- src/busctl/busctl.c | 33 +- src/coredump/coredumpctl.c | 14 +- src/hostname/hostnamectl.c | 19 +- src/login/loginctl.c | 43 +- src/machine/machinectl.c | 61 +- src/network/networkctl.c | 15 +- src/portable/portablectl.c | 27 +- src/resolve/resolvectl.c | 37 +- src/systemctl/systemctl.c | 121 +- src/timedate/timedatectl.c | 28 +- 23 files changed, 2784 insertions(+), 2778 deletions(-) diff --git a/man/bootctl.xml b/man/bootctl.xml index 7ce41b70f99..7f3e74e6774 100644 --- a/man/bootctl.xml +++ b/man/bootctl.xml @@ -37,63 +37,6 @@ current system. - - Options - The following options are understood: - - - - - Path to the EFI System Partition (ESP). If not specified, /efi/, - /boot/, and /boot/efi/ are checked in turn. It is - recommended to mount the ESP to /efi/, if possible. - - - - - Path to the Extended Boot Loader partition, as defined in the Boot Loader Specification. If not - specified, /boot/ is checked. It is recommended to mount the Extended Boot - Loader partition to /boot/, if possible. - - - - - - This option modifies the behaviour of status. Only prints the path - to the EFI System Partition (ESP) to standard output and exits. - - - - - - This option modifies the behaviour of status. Only prints the path - to the Extended Boot Loader partition if it exists, and the path to the ESP otherwise to standard - output and exit. This command is useful to determine where to place boot loader entries, as they are - preferably placed in the Extended Boot Loader partition if it exists and in the ESP otherwise. - - Boot Loader Specification Type #1 entries should generally be placed in the directory - $(bootctl -x)/loader/entries/. Existence of that directory may also be used as - indication that boot loader entry support is available on the system. Similarly, Boot Loader - Specification Type #2 entries should be placed in the directory $(bootctl - -x)/EFI/Linux/. - - Note that this option (similar to the option mentioned - above), is available independently from the boot loader used, i.e. also without - systemd-boot being installed. - - - - - Do not touch the firmware's boot loader list stored in EFI variables. - - - - - - - - Commands @@ -189,6 +132,63 @@ + + Options + The following options are understood: + + + + + Path to the EFI System Partition (ESP). If not specified, /efi/, + /boot/, and /boot/efi/ are checked in turn. It is + recommended to mount the ESP to /efi/, if possible. + + + + + Path to the Extended Boot Loader partition, as defined in the Boot Loader Specification. If not + specified, /boot/ is checked. It is recommended to mount the Extended Boot + Loader partition to /boot/, if possible. + + + + + + This option modifies the behaviour of status. Only prints the path + to the EFI System Partition (ESP) to standard output and exits. + + + + + + This option modifies the behaviour of status. Only prints the path + to the Extended Boot Loader partition if it exists, and the path to the ESP otherwise to standard + output and exit. This command is useful to determine where to place boot loader entries, as they are + preferably placed in the Extended Boot Loader partition if it exists and in the ESP otherwise. + + Boot Loader Specification Type #1 entries should generally be placed in the directory + $(bootctl -x)/loader/entries/. Existence of that directory may also be used as + indication that boot loader entry support is available on the system. Similarly, Boot Loader + Specification Type #2 entries should be placed in the directory $(bootctl + -x)/EFI/Linux/. + + Note that this option (similar to the option mentioned + above), is available independently from the boot loader used, i.e. also without + systemd-boot being installed. + + + + + Do not touch the firmware's boot loader list stored in EFI variables. + + + + + + + + Exit status On success, 0 is returned, a non-zero failure code otherwise. diff --git a/man/busctl.xml b/man/busctl.xml index 328c1016227..2f7eb999514 100644 --- a/man/busctl.xml +++ b/man/busctl.xml @@ -37,6 +37,126 @@ introspect and monitor the D-Bus bus. + + Commands + + The following commands are understood: + + + + list + + Show all peers on the bus, by their service + names. By default, shows both unique and well-known names, but + this may be changed with the and + switches. This is the default + operation if no command is specified. + + + + status SERVICE + + Show process information and credentials of a + bus service (if one is specified by its unique or well-known + name), a process (if one is specified by its numeric PID), or + the owner of the bus (if no parameter is + specified). + + + + monitor SERVICE + + Dump messages being exchanged. If + SERVICE is specified, show messages + to or from this peer, identified by its well-known or unique + name. Otherwise, show all messages on the bus. Use + CtrlC + to terminate the dump. + + + + capture SERVICE + + Similar to monitor but + writes the output in pcap format (for details, see the Libpcap + File Format description). Make sure to redirect + standard output to a file. Tools like + wireshark1 + may be used to dissect and view the resulting + files. + + + + tree SERVICE + + Shows an object tree of one or more + services. If SERVICE is specified, + show object tree of the specified services only. Otherwise, + show all object trees of all services on the bus that acquired + at least one well-known name. + + + + introspect SERVICE OBJECT INTERFACE + + Show interfaces, methods, properties and + signals of the specified object (identified by its path) on + the specified service. If the interface argument is passed, the + output is limited to members of the specified + interface. + + + + call SERVICE OBJECT INTERFACE METHOD SIGNATURE ARGUMENT + + Invoke a method and show the response. Takes a + service name, object path, interface name and method name. If + parameters shall be passed to the method call, a signature + string is required, followed by the arguments, individually + formatted as strings. For details on the formatting used, see + below. To suppress output of the returned data, use the + option. + + + + emit OBJECT INTERFACE SIGNAL SIGNATURE ARGUMENT + + Emit a signal. Takes a object path, interface name and method name. If parameters + shall be passed, a signature string is required, followed by the arguments, individually formatted as + strings. For details on the formatting used, see below. To specify the destination of the signal, + use the option. + + + + get-property SERVICE OBJECT INTERFACE PROPERTY + + Retrieve the current value of one or more + object properties. Takes a service name, object path, + interface name and property name. Multiple properties may be + specified at once, in which case their values will be shown one + after the other, separated by newlines. The output is, by + default, in terse format. Use for a + more elaborate output format. + + + + set-property SERVICE OBJECT INTERFACE PROPERTY SIGNATURE ARGUMENT + + Set the current value of an object + property. Takes a service name, object path, interface name, + property name, property signature, followed by a list of + parameters formatted as strings. + + + + help + + Show command syntax help. + + + + Options @@ -275,126 +395,6 @@ - - Commands - - The following commands are understood: - - - - list - - Show all peers on the bus, by their service - names. By default, shows both unique and well-known names, but - this may be changed with the and - switches. This is the default - operation if no command is specified. - - - - status SERVICE - - Show process information and credentials of a - bus service (if one is specified by its unique or well-known - name), a process (if one is specified by its numeric PID), or - the owner of the bus (if no parameter is - specified). - - - - monitor SERVICE - - Dump messages being exchanged. If - SERVICE is specified, show messages - to or from this peer, identified by its well-known or unique - name. Otherwise, show all messages on the bus. Use - CtrlC - to terminate the dump. - - - - capture SERVICE - - Similar to monitor but - writes the output in pcap format (for details, see the Libpcap - File Format description). Make sure to redirect - standard output to a file. Tools like - wireshark1 - may be used to dissect and view the resulting - files. - - - - tree SERVICE - - Shows an object tree of one or more - services. If SERVICE is specified, - show object tree of the specified services only. Otherwise, - show all object trees of all services on the bus that acquired - at least one well-known name. - - - - introspect SERVICE OBJECT INTERFACE - - Show interfaces, methods, properties and - signals of the specified object (identified by its path) on - the specified service. If the interface argument is passed, the - output is limited to members of the specified - interface. - - - - call SERVICE OBJECT INTERFACE METHOD SIGNATURE ARGUMENT - - Invoke a method and show the response. Takes a - service name, object path, interface name and method name. If - parameters shall be passed to the method call, a signature - string is required, followed by the arguments, individually - formatted as strings. For details on the formatting used, see - below. To suppress output of the returned data, use the - option. - - - - emit OBJECT INTERFACE SIGNAL SIGNATURE ARGUMENT - - Emit a signal. Takes a object path, interface name and method name. If parameters - shall be passed, a signature string is required, followed by the arguments, individually formatted as - strings. For details on the formatting used, see below. To specify the destination of the signal, - use the option. - - - - get-property SERVICE OBJECT INTERFACE PROPERTY - - Retrieve the current value of one or more - object properties. Takes a service name, object path, - interface name and property name. Multiple properties may be - specified at once, in which case their values will be shown one - after the other, separated by newlines. The output is, by - default, in terse format. Use for a - more elaborate output format. - - - - set-property SERVICE OBJECT INTERFACE PROPERTY SIGNATURE ARGUMENT - - Set the current value of an object - property. Takes a service name, object path, interface name, - property name, property signature, followed by a list of - parameters formatted as strings. - - - - help - - Show command syntax help. - - - - Parameter Formatting diff --git a/man/coredumpctl.xml b/man/coredumpctl.xml index 5419bc151aa..2b0f62a28dc 100644 --- a/man/coredumpctl.xml +++ b/man/coredumpctl.xml @@ -39,98 +39,6 @@ - - Options - - The following options are understood: - - - - - - - - - - Do not print column headers. - - - - - - - - Show information of a single core dump only, instead of listing - all known core dumps. - - - - - - - Only print entries which are since the specified date. - - - - - - - Only print entries which are until the specified date. - - - - - - - Reverse output so that the newest entries are displayed first. - - - - - FIELD - FIELD - - Print all possible data values the specified - field takes in matching core dump entries of the - journal. - - - - FILE - FILE - - Write the core to . - - - - - DEBUGGER - - Use the given debugger for the debug - command. If not given and $SYSTEMD_DEBUGGER is unset, then - gdb1 - will be used. - - - - DIR - DIR - - Use the journal files in the specified . - - - - - - - - Suppresses informational messages about lack - of access to journal files and possible in-flight coredumps. - - - - - Commands @@ -236,6 +144,98 @@ + + Options + + The following options are understood: + + + + + + + + + + Do not print column headers. + + + + + + + + Show information of a single core dump only, instead of listing + all known core dumps. + + + + + + + Only print entries which are since the specified date. + + + + + + + Only print entries which are until the specified date. + + + + + + + Reverse output so that the newest entries are displayed first. + + + + + FIELD + FIELD + + Print all possible data values the specified + field takes in matching core dump entries of the + journal. + + + + FILE + FILE + + Write the core to . + + + + + DEBUGGER + + Use the given debugger for the debug + command. If not given and $SYSTEMD_DEBUGGER is unset, then + gdb1 + will be used. + + + + DIR + DIR + + Use the journal files in the specified . + + + + + + + + Suppresses informational messages about lack + of access to journal files and possible in-flight coredumps. + + + + + Matching diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml index ddbeb7e7e65..03293382e6e 100644 --- a/man/hostnamectl.xml +++ b/man/hostnamectl.xml @@ -61,39 +61,6 @@ system images. - - Options - - The following options are understood: - - - - - - Do not query the user for authentication for - privileged operations. - - - - - - - - If status is invoked (or no explicit command is given) and one of these - switches is specified, hostnamectl will print out just this selected hostname. - - If used with set-hostname, only the selected hostname(s) will be updated. When more - than one of these switches are specified, all the specified hostnames will be updated. - - - - - - - - - - Commands @@ -201,6 +168,39 @@ + + Options + + The following options are understood: + + + + + + Do not query the user for authentication for + privileged operations. + + + + + + + + If status is invoked (or no explicit command is given) and one of these + switches is specified, hostnamectl will print out just this selected hostname. + + If used with set-hostname, only the selected hostname(s) will be updated. When more + than one of these switches are specified, all the specified hostnames will be updated. + + + + + + + + + + Exit status diff --git a/man/localectl.xml b/man/localectl.xml index 0752f7838cf..5efb5fec7c5 100644 --- a/man/localectl.xml +++ b/man/localectl.xml @@ -59,38 +59,6 @@ system images. - - Options - - The following options are understood: - - - - - - Do not query the user for authentication for - privileged operations. - - - - - - If set-keymap or - set-x11-keymap is invoked and this option - is passed, then the keymap will not be converted from the - console to X11, or X11 to console, - respectively. - - - - - - - - - - - Commands @@ -178,6 +146,38 @@ + + Options + + The following options are understood: + + + + + + Do not query the user for authentication for + privileged operations. + + + + + + If set-keymap or + set-x11-keymap is invoked and this option + is passed, then the keymap will not be converted from the + console to X11, or X11 to console, + respectively. + + + + + + + + + + + Exit status diff --git a/man/loginctl.xml b/man/loginctl.xml index 7b0745f93e5..05a4c75c793 100644 --- a/man/loginctl.xml +++ b/man/loginctl.xml @@ -40,114 +40,6 @@ systemd-logind.service8. - - Options - - The following options are understood: - - - - - - Do not query the user for authentication for - privileged operations. - - - - - - - When showing session/user/seat properties, - limit display to certain properties as specified as argument. - If not specified, all set properties are shown. The argument - should be a property name, such as - Sessions. If specified more than once, all - properties with the specified names are - shown. - - - - - - When showing session/user/seat properties, - only print the value, and skip the property name and - =. - - - - - - - When showing session/user/seat properties, - show all properties regardless of whether they are set or - not. - - - - - - - Do not ellipsize process tree entries. - - - - - - - When used with - kill-session, choose which processes to - kill. Must be one of , or - to select whether to kill only the leader - process of the session or all processes of the session. If - omitted, defaults to . - - - - - - - When used with kill-session - or kill-user, choose which signal to send - to selected processes. Must be one of the well known signal - specifiers, such as SIGTERM, - SIGINT or SIGSTOP. - If omitted, defaults to - SIGTERM. - - - - - - - When used with user-status - and session-status, controls the number of - journal lines to show, counting from the most recent ones. - Takes a positive integer argument. Defaults to 10. - - - - - - - - When used with user-status - and session-status, controls the formatting - of the journal entries that are shown. For the available - choices, see - journalctl1. - Defaults to short. - - - - - - - - - - - - Commands @@ -376,6 +268,114 @@ + + Options + + The following options are understood: + + + + + + Do not query the user for authentication for + privileged operations. + + + + + + + When showing session/user/seat properties, + limit display to certain properties as specified as argument. + If not specified, all set properties are shown. The argument + should be a property name, such as + Sessions. If specified more than once, all + properties with the specified names are + shown. + + + + + + When showing session/user/seat properties, + only print the value, and skip the property name and + =. + + + + + + + When showing session/user/seat properties, + show all properties regardless of whether they are set or + not. + + + + + + + Do not ellipsize process tree entries. + + + + + + + When used with + kill-session, choose which processes to + kill. Must be one of , or + to select whether to kill only the leader + process of the session or all processes of the session. If + omitted, defaults to . + + + + + + + When used with kill-session + or kill-user, choose which signal to send + to selected processes. Must be one of the well known signal + specifiers, such as SIGTERM, + SIGINT or SIGSTOP. + If omitted, defaults to + SIGTERM. + + + + + + + When used with user-status + and session-status, controls the number of + journal lines to show, counting from the most recent ones. + Takes a positive integer argument. Defaults to 10. + + + + + + + + When used with user-status + and session-status, controls the formatting + of the journal entries that are shown. For the available + choices, see + journalctl1. + Defaults to short. + + + + + + + + + + + + Exit status diff --git a/man/machinectl.xml b/man/machinectl.xml index ebec72317f5..e1a2da309f7 100644 --- a/man/machinectl.xml +++ b/man/machinectl.xml @@ -79,220 +79,6 @@ - - Options - - The following options are understood: - - - - - - - When showing machine or image properties, - limit the output to certain properties as specified by the - argument. If not specified, all set properties are shown. The - argument should be a property name, such as - Name. If specified more than once, all - properties with the specified names are - shown. - - - - - - - When showing machine or image properties, show - all properties regardless of whether they are set or - not. - - When listing VM or container images, do not suppress - images beginning in a dot character - (.). - - When cleaning VM or container images, remove all images, not just hidden ones. - - - - - - When printing properties with show, only print the value, - and skip the property name and =. - - - - - - - Do not ellipsize process tree entries. - - - - - - - When used with kill, choose - which processes to kill. Must be one of - , or to select - whether to kill only the leader process of the machine or all - processes of the machine. If omitted, defaults to - . - - - - - - - When used with kill, choose - which signal to send to selected processes. Must be one of the - well-known signal specifiers, such as - SIGTERM, SIGINT or - SIGSTOP. If omitted, defaults to - SIGTERM. - - - - - - When used with the shell command, chooses the user ID to - open the interactive shell session as. If the argument to the shell - command also specifies a user name, this option is ignored. If the name is not specified - in either way, root will be used by default. Note that this switch is - not supported for the login command (see below). - - - - - - - When used with the shell command, sets an environment - variable to pass to the executed shell. Takes an environment variable name and value, - separated by =. This switch may be used multiple times to set multiple - environment variables. Note that this switch is not supported for the - login command (see below). - - - - - - When used with bind, creates the destination file or directory before - applying the bind mount. Note that even though the name of this option suggests that it is suitable only for - directories, this option also creates the destination file node to mount over if the object to mount is not - a directory, but a regular file, device node, socket or FIFO. - - - - - - When used with bind, creates a read-only bind mount. - - When used with clone, import-raw or import-tar a - read-only container or VM image is created. - - - - - - - When used with status, - controls the number of journal lines to show, counting from - the most recent ones. Takes a positive integer argument. - Defaults to 10. - - - - - - - - When used with status, - controls the formatting of the journal entries that are shown. - For the available choices, see - journalctl1. - Defaults to short. - - - - - - When downloading a container or VM image, - specify whether the image shall be verified before it is made - available. Takes one of no, - checksum and signature. - If no, no verification is done. If - checksum is specified, the download is - checked for integrity after the transfer is complete, but no - signatures are verified. If signature is - specified, the checksum is verified and the image's signature - is checked against a local keyring of trustable vendors. It is - strongly recommended to set this option to - signature if the server and protocol - support this. Defaults to - signature. - - - - - - When downloading a container or VM image, and - a local copy by the specified local machine name already - exists, delete it first and replace it by the newly downloaded - image. - - - - - - When used with the - or commands, specifies the - compression format to use for the resulting file. Takes one of - uncompressed, xz, - gzip, bzip2. By default, - the format is determined automatically from the image file - name passed. - - - - - - When used with the - command, limits the number of ip addresses output for every machine. - Defaults to 1. All addresses can be requested with all - as argument to . If the argument to - is less than the actual number - of addresses, ...follows the last address. - If multiple addresses are to be written for a given machine, every - address except the first one is on a new line and is followed by - , if another address will be output afterwards. - - - - - - - Suppresses additional informational output while running. - - - - - - - - - Connect to - systemd-machined.service8 - running in a local container, to perform the specified operation within - the container. - - - - - - - - - - Commands @@ -849,6 +635,220 @@ + + Options + + The following options are understood: + + + + + + + When showing machine or image properties, + limit the output to certain properties as specified by the + argument. If not specified, all set properties are shown. The + argument should be a property name, such as + Name. If specified more than once, all + properties with the specified names are + shown. + + + + + + + When showing machine or image properties, show + all properties regardless of whether they are set or + not. + + When listing VM or container images, do not suppress + images beginning in a dot character + (.). + + When cleaning VM or container images, remove all images, not just hidden ones. + + + + + + When printing properties with show, only print the value, + and skip the property name and =. + + + + + + + Do not ellipsize process tree entries. + + + + + + + When used with kill, choose + which processes to kill. Must be one of + , or to select + whether to kill only the leader process of the machine or all + processes of the machine. If omitted, defaults to + . + + + + + + + When used with kill, choose + which signal to send to selected processes. Must be one of the + well-known signal specifiers, such as + SIGTERM, SIGINT or + SIGSTOP. If omitted, defaults to + SIGTERM. + + + + + + When used with the shell command, chooses the user ID to + open the interactive shell session as. If the argument to the shell + command also specifies a user name, this option is ignored. If the name is not specified + in either way, root will be used by default. Note that this switch is + not supported for the login command (see below). + + + + + + + When used with the shell command, sets an environment + variable to pass to the executed shell. Takes an environment variable name and value, + separated by =. This switch may be used multiple times to set multiple + environment variables. Note that this switch is not supported for the + login command (see below). + + + + + + When used with bind, creates the destination file or directory before + applying the bind mount. Note that even though the name of this option suggests that it is suitable only for + directories, this option also creates the destination file node to mount over if the object to mount is not + a directory, but a regular file, device node, socket or FIFO. + + + + + + When used with bind, creates a read-only bind mount. + + When used with clone, import-raw or import-tar a + read-only container or VM image is created. + + + + + + + When used with status, + controls the number of journal lines to show, counting from + the most recent ones. Takes a positive integer argument. + Defaults to 10. + + + + + + + + When used with status, + controls the formatting of the journal entries that are shown. + For the available choices, see + journalctl1. + Defaults to short. + + + + + + When downloading a container or VM image, + specify whether the image shall be verified before it is made + available. Takes one of no, + checksum and signature. + If no, no verification is done. If + checksum is specified, the download is + checked for integrity after the transfer is complete, but no + signatures are verified. If signature is + specified, the checksum is verified and the image's signature + is checked against a local keyring of trustable vendors. It is + strongly recommended to set this option to + signature if the server and protocol + support this. Defaults to + signature. + + + + + + When downloading a container or VM image, and + a local copy by the specified local machine name already + exists, delete it first and replace it by the newly downloaded + image. + + + + + + When used with the + or commands, specifies the + compression format to use for the resulting file. Takes one of + uncompressed, xz, + gzip, bzip2. By default, + the format is determined automatically from the image file + name passed. + + + + + + When used with the + command, limits the number of ip addresses output for every machine. + Defaults to 1. All addresses can be requested with all + as argument to . If the argument to + is less than the actual number + of addresses, ...follows the last address. + If multiple addresses are to be written for a given machine, every + address except the first one is on a new line and is followed by + , if another address will be output afterwards. + + + + + + + Suppresses additional informational output while running. + + + + + + + + + Connect to + systemd-machined.service8 + running in a local container, to perform the specified operation within + the container. + + + + + + + + + + Machine and Image Names diff --git a/man/networkctl.xml b/man/networkctl.xml index 842702fa332..14277a75f01 100644 --- a/man/networkctl.xml +++ b/man/networkctl.xml @@ -41,42 +41,6 @@ configuration syntax. - - Options - - The following options are understood: - - - - - - - - - - Show all links with status. - - - - - - - - - - - Show link statistics with status. - - - - - - - - - - - Commands @@ -300,6 +264,42 @@ s - Service VLAN, m - Two-port MAC Relay (TPMR) + + Options + + The following options are understood: + + + + + + + + + + Show all links with status. + + + + + + + + + + + Show link statistics with status. + + + + + + + + + + + Exit status diff --git a/man/portablectl.xml b/man/portablectl.xml index 01f6a1deeac..1db7771d140 100644 --- a/man/portablectl.xml +++ b/man/portablectl.xml @@ -63,76 +63,6 @@ - - Options - - The following options are understood: - - - - - - - Suppresses additional informational output while running. - - - - PROFILE - PROFILE - - When attaching an image, select the profile to use. By default the default - profile is used. For details about profiles, see below. - - - - - - When attaching an image, select whether to prefer copying or symlinking of files installed into - the host system. Takes one of copy (to prefer copying of files), symlink - (to prefer creation of symbolic links) or auto for an intermediary mode where security - profile drop-ins are symlinked while unit files are copied. Note that this option expresses a preference only, - in cases where symbolic links cannot be created — for example when the image operated on is a raw disk image, - and hence not directly referentiable from the host file system — copying of files is used - unconditionally. - - - - - - When specified the unit and drop-in files are placed in - /run/systemd/system.attached/ instead of - /etc/systemd/system.attached/. Images attached with this option set hence remain attached - only until the next reboot, while they are normally attached persistently. - - - - - - Don't reload the service manager after attaching or detaching a portable service - image. Normally the service manager is reloaded to ensure it is aware of added or removed unit - files. - - - - - - When inspecting portable service images, show the (unprocessed) contents of the metadata files - pulled from the image, instead of brief summaries. Specifically, this will show the - os-release5 and unit file - contents of the image. - - - - - - - - - - - - - Commands @@ -322,6 +252,76 @@ + + Options + + The following options are understood: + + + + + + + Suppresses additional informational output while running. + + + + PROFILE + PROFILE + + When attaching an image, select the profile to use. By default the default + profile is used. For details about profiles, see below. + + + + + + When attaching an image, select whether to prefer copying or symlinking of files installed into + the host system. Takes one of copy (to prefer copying of files), symlink + (to prefer creation of symbolic links) or auto for an intermediary mode where security + profile drop-ins are symlinked while unit files are copied. Note that this option expresses a preference only, + in cases where symbolic links cannot be created — for example when the image operated on is a raw disk image, + and hence not directly referentiable from the host file system — copying of files is used + unconditionally. + + + + + + When specified the unit and drop-in files are placed in + /run/systemd/system.attached/ instead of + /etc/systemd/system.attached/. Images attached with this option set hence remain attached + only until the next reboot, while they are normally attached persistently. + + + + + + Don't reload the service manager after attaching or detaching a portable service + image. Normally the service manager is reloaded to ensure it is aware of added or removed unit + files. + + + + + + When inspecting portable service images, show the (unprocessed) contents of the metadata files + pulled from the image, instead of brief summaries. Specifically, this will show the + os-release5 and unit file + contents of the image. + + + + + + + + + + + + + Files and Directories diff --git a/man/resolvectl.xml b/man/resolvectl.xml index ccc1b378f8c..8c1d6e5de4a 100644 --- a/man/resolvectl.xml +++ b/man/resolvectl.xml @@ -48,115 +48,6 @@ name, the localhost host name or all data from /etc/hosts. - - Options - - - - - - By default, when resolving a hostname, both IPv4 and IPv6 - addresses are acquired. By specifying only IPv4 addresses are requested, by specifying - only IPv6 addresses are requested. - - - - - INTERFACE - INTERFACE - - Specifies the network interface to execute the query on. This may either be specified as numeric - interface index or as network interface string (e.g. en0). Note that this option has no - effect if system-wide DNS configuration (as configured in /etc/resolv.conf or - /etc/systemd/resolve.conf) in place of per-link configuration is used. - - - - PROTOCOL - PROTOCOL - - Specifies the network protocol for the query. May be one of dns - (i.e. classic unicast DNS), llmnr (Link-Local Multicast Name Resolution), - llmnr-ipv4, llmnr-ipv6 (LLMNR via the indicated underlying IP - protocols), mdns (Multicast DNS), - mdns-ipv4, mdns-ipv6 (MDNS via the indicated underlying IP protocols). - By default the lookup is done via all protocols suitable for the lookup. If used, limits the set of - protocols that may be used. Use this option multiple times to enable resolving via multiple protocols at the - same time. The setting llmnr is identical to specifying this switch once with - llmnr-ipv4 and once via llmnr-ipv6. Note that this option does not force - the service to resolve the operation with the specified protocol, as that might require a suitable network - interface and configuration. - The special value help may be used to list known values. - - - - - TYPE - TYPE - CLASS - CLASS - - Specifies the DNS resource record type (e.g. A, AAAA, MX, …) and class (e.g. IN, ANY, …) to - look up. If these options are used a DNS resource record set matching the specified class and type is - requested. The class defaults to IN if only a type is specified. - The special value help may be used to list known values. - - - - - BOOL - - Takes a boolean parameter. If true (the default), when doing a service lookup with - the hostnames contained in the SRV resource records are resolved as well. - - - - BOOL - - Takes a boolean parameter. If true (the default), when doing a DNS-SD service lookup with - the TXT service metadata record is resolved as well. - - - - BOOL - - Takes a boolean parameter. If true (the default), DNS CNAME or DNAME redirections are - followed. Otherwise, if a CNAME or DNAME record is encountered while resolving, an error is - returned. - - - - BOOL - - Takes a boolean parameter. If true (the default), any specified single-label hostnames will be - searched in the domains configured in the search domain list, if it is non-empty. Otherwise, the search domain - logic is disabled. - - - - =payload|packet - - Dump the answer as binary data. If there is no argument or if the argument is - payload, the payload of the packet is exported. If the argument is - packet, the whole packet is dumped in wire format, prefixed by - length specified as a little-endian 64-bit number. This format allows multiple packets - to be dumped and unambiguously parsed. - - - - BOOL - - Takes a boolean parameter. If true (the default), column headers and meta information about the - query response are shown. Otherwise, this output is suppressed. - - - - - - - - Commands @@ -281,6 +172,115 @@ + + Options + + + + + + By default, when resolving a hostname, both IPv4 and IPv6 + addresses are acquired. By specifying only IPv4 addresses are requested, by specifying + only IPv6 addresses are requested. + + + + + INTERFACE + INTERFACE + + Specifies the network interface to execute the query on. This may either be specified as numeric + interface index or as network interface string (e.g. en0). Note that this option has no + effect if system-wide DNS configuration (as configured in /etc/resolv.conf or + /etc/systemd/resolve.conf) in place of per-link configuration is used. + + + + PROTOCOL + PROTOCOL + + Specifies the network protocol for the query. May be one of dns + (i.e. classic unicast DNS), llmnr (Link-Local Multicast Name Resolution), + llmnr-ipv4, llmnr-ipv6 (LLMNR via the indicated underlying IP + protocols), mdns (Multicast DNS), + mdns-ipv4, mdns-ipv6 (MDNS via the indicated underlying IP protocols). + By default the lookup is done via all protocols suitable for the lookup. If used, limits the set of + protocols that may be used. Use this option multiple times to enable resolving via multiple protocols at the + same time. The setting llmnr is identical to specifying this switch once with + llmnr-ipv4 and once via llmnr-ipv6. Note that this option does not force + the service to resolve the operation with the specified protocol, as that might require a suitable network + interface and configuration. + The special value help may be used to list known values. + + + + + TYPE + TYPE + CLASS + CLASS + + Specifies the DNS resource record type (e.g. A, AAAA, MX, …) and class (e.g. IN, ANY, …) to + look up. If these options are used a DNS resource record set matching the specified class and type is + requested. The class defaults to IN if only a type is specified. + The special value help may be used to list known values. + + + + + BOOL + + Takes a boolean parameter. If true (the default), when doing a service lookup with + the hostnames contained in the SRV resource records are resolved as well. + + + + BOOL + + Takes a boolean parameter. If true (the default), when doing a DNS-SD service lookup with + the TXT service metadata record is resolved as well. + + + + BOOL + + Takes a boolean parameter. If true (the default), DNS CNAME or DNAME redirections are + followed. Otherwise, if a CNAME or DNAME record is encountered while resolving, an error is + returned. + + + + BOOL + + Takes a boolean parameter. If true (the default), any specified single-label hostnames will be + searched in the domains configured in the search domain list, if it is non-empty. Otherwise, the search domain + logic is disabled. + + + + =payload|packet + + Dump the answer as binary data. If there is no argument or if the argument is + payload, the payload of the packet is exported. If the argument is + packet, the whole packet is dumped in wire format, prefixed by + length specified as a little-endian 64-bit number. This format allows multiple packets + to be dumped and unambiguously parsed. + + + + BOOL + + Takes a boolean parameter. If true (the default), column headers and meta information about the + query response are shown. Otherwise, this output is suppressed. + + + + + + + + Compatibility with <citerefentry><refentrytitle>resolvconf</refentrytitle><manvolnum>8</manvolnum></citerefentry> diff --git a/man/systemctl.xml b/man/systemctl.xml index 9abbb851aa9..5884a5e4c17 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -45,1993 +45,1993 @@ - Options - - The following options are understood: + Commands - - - - + The following commands are understood: - - The argument should be a comma-separated list of unit - types such as and - . - + + Unit Commands - If one of the arguments is a unit type, when listing - units, limit display to certain unit types. Otherwise, units - of all types will be shown. + + + list-units PATTERN… - As a special case, if one of the arguments is - , a list of allowed values will be - printed and the program will exit. - - + + List units that systemd currently has in memory. This includes units that are + either referenced directly or through a dependency, units that are pinned by applications programmatically, + or units that were active in the past and have failed. By default only units which are active, have pending + jobs, or have failed are shown; this can be changed with option . If one or more + PATTERNs are specified, only units matching one of them are shown. The units + that are shown are additionally filtered by and if those + options are specified. - - + Produces output similar to + UNIT LOAD ACTIVE SUB DESCRIPTION + sys-module-fuse.device loaded active plugged /sys/module/fuse + -.mount loaded active mounted Root Mount + boot-efi.mount loaded active mounted /boot/efi + systemd-journald.service loaded active running Journal Service + systemd-logind.service loaded active running Login Service +● user@1000.service loaded failed failed User Manager for UID 1000 + … + systemd-tmpfiles-clean.timer loaded active waiting Daily Cleanup of Temporary Directories - - The argument should be a comma-separated list of unit - LOAD, SUB, or ACTIVE states. When listing units, show only - those in the specified states. Use - to show only failed units. +LOAD = Reflects whether the unit definition was properly loaded. +ACTIVE = The high-level unit activation state, i.e. generalization of SUB. +SUB = The low-level unit activation state, values depend on unit type. - As a special case, if one of the arguments is - , a list of allowed values will be - printed and the program will exit. - - +123 loaded units listed. Pass --all to see loaded but inactive units, too. +To show all installed unit files use 'systemctl list-unit-files'. + + The header and the last unit of a given type are underlined if the + terminal supports that. A colored dot is shown next to services which + were masked, not found, or otherwise failed. - - - + The LOAD column shows the load state, one of loaded, + not-found, bad-setting, error, + masked. The ACTIVE columns shows the general unit state, one of + active, reloading, inactive, + failed, activating, deactivating. The SUB + column shows the unit-type-specific detailed state of the unit, possible values vary by unit type. The list + of possible LOAD, ACTIVE, and SUB states is not constant and new systemd releases may both add and remove + values. systemctl --state=help command maybe be used to display the + current set of possible values. - - When showing unit/job/manager properties with the - show command, limit display to properties - specified in the argument. The argument should be a - comma-separated list of property names, such as - MainPID. Unless specified, all known - properties are shown. If specified more than once, all - properties with the specified names are shown. Shell - completion is implemented for property names. + This is the default command. + + - For the manager itself, - systemctl show will show all available - properties. Those properties are documented in - systemd-system.conf5. - + + list-sockets PATTERN… - Properties for units vary by unit type, so showing any - unit (even a non-existent one) is a way to list properties - pertaining to this type. Similarly, showing any job will list - properties pertaining to all jobs. Properties for units are - documented in - systemd.unit5, - and the pages for individual unit types - systemd.service5, - systemd.socket5, - etc. - - + + List socket units currently in memory, ordered by listening address. If one or more + PATTERNs are specified, only socket units matching one of them are + shown. Produces output similar to + +LISTEN UNIT ACTIVATES +/dev/initctl systemd-initctl.socket systemd-initctl.service +… +[::]:22 sshd.socket sshd.service +kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service - - - +5 sockets listed. + Note: because the addresses might contains spaces, this output + is not suitable for programmatic consumption. + - - When listing units with list-units, also show inactive units and - units which are following other units. When showing unit/job/manager properties, show all - properties regardless whether they are set or not. + Also see , , and . + + - To list all units installed in the file system, use the - list-unit-files command instead. + + list-timers PATTERN… - When listing units with list-dependencies, recursively show - dependencies of all dependent units (by default only dependencies of target units are - shown). + + List timer units currently in memory, ordered by the time they elapse next. If one or more + PATTERNs are specified, only units matching one of them are shown. + Produces output similar to + +NEXT LEFT LAST PASSED UNIT ACTIVATES +n/a n/a Thu 2017-02-23 13:40:29 EST 3 days ago ureadahead-stop.timer ureadahead-stop.service +Sun 2017-02-26 18:55:42 EST 1min 14s left Thu 2017-02-23 13:54:44 EST 3 days ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service +Sun 2017-02-26 20:37:16 EST 1h 42min left Sun 2017-02-26 11:56:36 EST 6h ago apt-daily.timer apt-daily.service +Sun 2017-02-26 20:57:49 EST 2h 3min left Sun 2017-02-26 11:56:36 EST 6h ago snapd.refresh.timer snapd.refresh.service + + - When used with status, show journal messages in full, even if they include - unprintable characters or are very long. By default, fields with unprintable characters are - abbreviated as "blob data". (Note that the pager may escape unprintable characters again.) - - + NEXT shows the next time the timer will run. + LEFT shows how long till the next time the timer runs. + LAST shows the last time the timer ran. + PASSED shows how long has passed since the timer last ran. + UNIT shows the name of the timer + ACTIVATES shows the name the service the timer activates when it runs. - - - + Also see and . + + - - When listing units, also show units of local - containers. Units of local containers will be prefixed with - the container name, separated by a single colon character - (:). - - + + start PATTERN… - - + + Start (activate) one or more units specified on the + command line. - - Show reverse dependencies between units with - list-dependencies, i.e. follow - dependencies of type WantedBy=, - RequiredBy=, - PartOf=, BoundBy=, - instead of Wants= and similar. - - - + Note that glob patterns operate on the set of primary names of units currently in memory. Units which + are not active and are not in a failed state usually are not in memory, and will not be matched by any + pattern. In addition, in case of instantiated units, systemd is often unaware of the instance name until + the instance has been started. Therefore, using glob patterns with start has limited + usefulness. Also, secondary alias names of units are not considered. + + + + stop PATTERN… - - + + Stop (deactivate) one or more units specified on the command line. - - With list-dependencies, show the - units that are ordered before the specified unit. In other - words, recursively list units following the - After= dependency. + This command will fail if the unit does not exist or if stopping of the unit is prohibited (see + RefuseManualStop= in + systemd.unit5). + It will not fail if any of the commands configured to stop the unit + (ExecStop=, etc.) fail, because the manager will still forcibly terminate the + unit. + + + + reload PATTERN… - Note that any After= dependency is - automatically mirrored to create a - Before= dependency. Temporal dependencies - may be specified explicitly, but are also created implicitly - for units which are WantedBy= targets - (see - systemd.target5), - and as a result of other directives (for example - RequiresMountsFor=). Both explicitly - and implicitly introduced dependencies are shown with - list-dependencies. + + Asks all units listed on the command line to reload + their configuration. Note that this will reload the + service-specific configuration, not the unit configuration + file of systemd. If you want systemd to reload the + configuration file of a unit, use the + daemon-reload command. In other words: + for the example case of Apache, this will reload Apache's + httpd.conf in the web server, not the + apache.service systemd unit + file. - When passed to the list-jobs command, for each printed job show which other jobs are - waiting for it. May be combined with to show both the jobs waiting for each job as - well as all jobs each job is waiting for. - - + This command should not be confused with the + daemon-reload command. + - - + + + restart PATTERN… - - With list-dependencies, show the - units that are ordered after the specified unit. In other - words, recursively list units following the - Before= dependency. - - When passed to the list-jobs command, for each printed job show which other jobs it - is waiting for. May be combined with to show both the jobs waiting for each job as - well as all jobs each job is waiting for. - - + + Stop and then start one or more units specified on the command line. If the units are not running + yet, they will be started. - - - + Note that restarting a unit with this command does not necessarily flush out all of the unit's + resources before it is started again. For example, the per-service file descriptor storage facility (see + FileDescriptorStoreMax= in + systemd.service5) will + remain intact as long as the unit has a job pending, and is only cleared when the unit is fully stopped and + no jobs are pending anymore. If it is intended that the file descriptor store is flushed out, too, during a + restart operation an explicit systemctl stop command followed by systemctl + start should be issued. + + + + try-restart PATTERN… - - Do not ellipsize unit names, process tree entries, - journal output, or truncate unit descriptions in the output - of status, list-units, - list-jobs, and - list-timers. - Also, show installation targets in the output of - is-enabled. - - + + Stop and then start one or more units specified on the + command line if the units are running. This does nothing + if units are not running. + + + + + reload-or-restart PATTERN… - - + + Reload one or more units if they support it. If not, stop and then start them instead. If the units + are not running yet, they will be started. + + + + try-reload-or-restart PATTERN… - - When printing properties with show, - only print the value, and skip the property name and - =. - - + + Reload one or more units if they support it. If not, stop and then start them instead. This does + nothing if the units are not running. + + + + + isolate UNIT - - + + Start the unit specified on the command line and its dependencies + and stop all others, unless they have + (see + systemd.unit5). + If a unit name with no extension is given, an extension of + .target will be assumed. - - When showing sockets, show the type of the socket. - - + This is similar to changing the runlevel in a + traditional init system. The isolate + command will immediately stop processes that are not enabled + in the new unit, possibly including the graphical + environment or terminal you are currently using. - - + Note that this is allowed only on units where + is enabled. See + systemd.unit5 + for details. + + + + kill PATTERN… - - When queuing a new job, this option controls how to deal with - already queued jobs. It takes one of fail, - replace, - replace-irreversibly, - isolate, - ignore-dependencies, - ignore-requirements or - flush. Defaults to - replace, except when the - isolate command is used which implies the - isolate job mode. + + Send a signal to one or more processes of the + unit. Use to select which + process to kill. Use to select + the signal to send. + + + + clean PATTERN… - If fail is specified and a requested - operation conflicts with a pending job (more specifically: - causes an already pending start job to be reversed into a stop - job or vice versa), cause the operation to fail. + + Remove the configuration, state, cache, logs or runtime data of the specified units. Use + to select which kind of resource to remove. For service units this may + be used to remove the directories configured with ConfigurationDirectory=, + StateDirectory=, CacheDirectory=, + LogsDirectory= and RuntimeDirectory=, see + systemd.exec5 + for details. For timer units this may be used to clear out the persistent timestamp data if + Persistent= is used and is selected, see + systemd.timer5. This + command only applies to units that use either of these settings. If is + not specified, both the cache and runtime data are removed (as these two types of data are + generally redundant and reproducible on the next invocation of the unit). + + + + is-active PATTERN… - If replace (the default) is - specified, any conflicting pending job will be replaced, as - necessary. + + Check whether any of the specified units are active + (i.e. running). Returns an exit code + 0 if at least one is active, or + non-zero otherwise. Unless is + specified, this will also print the current unit state to + standard output. + + + + is-failed PATTERN… - If replace-irreversibly is specified, - operate like replace, but also mark the new - jobs as irreversible. This prevents future conflicting - transactions from replacing these jobs (or even being enqueued - while the irreversible jobs are still pending). Irreversible - jobs can still be cancelled using the cancel - command. This job mode should be used on any transaction which - pulls in shutdown.target. + + Check whether any of the specified units are in a + "failed" state. Returns an exit code + 0 if at least one has failed, + non-zero otherwise. Unless is + specified, this will also print the current unit state to + standard output. + + + + status PATTERN…|PID…] - isolate is only valid for start - operations and causes all other units to be stopped when the - specified unit is started. This mode is always used when the - isolate command is used. + + Show terse runtime status information about one or + more units, followed by most recent log data from the + journal. If no units are specified, show system status. If + combined with , also show the status of + all units (subject to limitations specified with + ). If a PID is passed, show information + about the unit the process belongs to. - flush will cause all queued jobs to - be canceled when the new job is enqueued. + This function is intended to generate human-readable + output. If you are looking for computer-parsable output, + use show instead. By default, this + function only shows 10 lines of output and ellipsizes + lines to fit in the terminal window. This can be changed + with and , + see above. In addition, journalctl + --unit=NAME or + journalctl + --user-unit=NAME use + a similar filter for messages and might be more + convenient. + - If ignore-dependencies is specified, - then all unit dependencies are ignored for this new job and - the operation is executed immediately. If passed, no required - units of the unit passed will be pulled in, and no ordering - dependencies will be honored. This is mostly a debugging and - rescue tool for the administrator and should not be used by - applications. + systemd implicitly loads units as necessary, so just running the status will + attempt to load a file. The command is thus not useful for determining if something was already loaded or + not. The units may possibly also be quickly unloaded after the operation is completed if there's no reason + to keep it in memory thereafter. + - ignore-requirements is similar to - ignore-dependencies, but only causes the - requirement dependencies to be ignored, the ordering - dependencies will still be honored. - + + Example output from systemctl status - + $ systemctl status bluetooth +● bluetooth.service - Bluetooth service + Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) + Active: active (running) since Wed 2017-01-04 13:54:04 EST; 1 weeks 0 days ago + Docs: man:bluetoothd(8) + Main PID: 930 (bluetoothd) + Status: "Running" + Tasks: 1 + Memory: 648.0K + CPU: 435ms + CGroup: /system.slice/bluetooth.service + └─930 /usr/lib/bluetooth/bluetoothd - - - +Jan 12 10:46:45 example.com bluetoothd[8900]: Not enough free handles to register service +Jan 12 10:46:45 example.com bluetoothd[8900]: Current Time Service could not be registered +Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output error (5) + - - When enqueuing a unit job (for example as effect of a systemctl start - invocation or similar), show brief information about all jobs enqueued, covering both the requested - job and any added because of unit dependencies. Note that the output will only include jobs - immediately part of the transaction requested. It is possible that service start-up program code - run as effect of the enqueued jobs might request further jobs to be pulled in. This means that - completion of the listed jobs might ultimately entail more jobs than the listed ones. - - + The dot ("●") uses color on supported terminals to summarize the unit state at a glance. White + indicates an inactive or deactivating state. Red indicates a + failed or error state and green indicates an + active, reloading or activating state. + - - + The "Loaded:" line in the output will show loaded if the unit has been loaded into + memory. Other possible values for "Loaded:" include: error if there was a problem + loading it, not-found if not unit file was found for this unit, + bad-setting if an essential unit file setting could not be parsed and + masked if the unit file has been masked. Along with showing the path to the unit file, + this line will also show the enablement state. Enabled commands start at boot. See the full table of + possible enablement states — including the definition of masked — in the documentation + for the is-enabled command. + - - Shorthand for fail. - When used with the kill command, - if no units were killed, the operation results in an error. - - - + The "Active:" line shows active state. The value is usually active or + inactive. Active could mean started, bound, plugged in, etc depending on the unit type. + The unit could also be in process of changing states, reporting a state of activating or + deactivating. A special failed state is entered when the service + failed in some way, such as a crash, exiting with an error code or timing out. If the failed state is + entered the cause will be logged for later reference. + - - - + + + + show PATTERN…|JOB… - - When system shutdown or a sleep state is requested, ignore inhibitor locks. Applications can establish - inhibitor locks to avoid that certain important operations (such as CD burning or suchlike) are interrupted - by system shutdown or a sleep state. Any user may take these locks and privileged users may override these - locks. If any locks are taken, shutdown and sleep state requests will normally fail (unless privileged) and a - list of active locks is printed. However, if is specified, the - established locks are ignored and not shown, and the operation attempted anyway, possibly requiring - additional privileges. - - + + Show properties of one or more units, jobs, or the manager itself. If no argument is specified, + properties of the manager will be shown. If a unit name is specified, properties of the unit are shown, and + if a job ID is specified, properties of the job are shown. By default, empty properties are suppressed. Use + to show those too. To select specific properties to show, use + . This command is intended to be used whenever computer-parsable output is + required. Use status if you are looking for formatted human-readable output. - - + Many properties shown by systemctl show map directly to configuration settings of + the system and service manager and its unit files. Note that the properties shown by the command are + generally more low-level, normalized versions of the original configuration settings and expose runtime + state in addition to configuration. For example, properties shown for service units include the service's + current main process identifier as MainPID (which is runtime state), and time settings + are always exposed as properties ending in the …USec suffix even if a matching + configuration options end in …Sec, because microseconds is the normalized time unit used + by the system and service manager. + + + + cat PATTERN… - - Just print what would be done. Currently supported by verbs - halt, poweroff, reboot, - kexec, suspend, hibernate, - hybrid-sleep, suspend-then-hibernate, - default, rescue, - emergency, and exit. - - + + Show backing files of one or more units. Prints the + "fragment" and "drop-ins" (source files) of units. Each + file is preceded by a comment which includes the file + name. Note that this shows the contents of the backing files + on disk, which may not match the system manager's + understanding of these units if any unit files were + updated on disk and the daemon-reload + command wasn't issued since. + + + + set-property UNIT PROPERTY=VALUE… - - - + + Set the specified unit properties at runtime where + this is supported. This allows changing configuration + parameter properties such as resource control settings at + runtime. Not all properties may be changed at runtime, but + many resource control settings (primarily those in + systemd.resource-control5) + may. The changes are applied immediately, and stored on disk + for future boots, unless is + passed, in which case the settings only apply until the + next reboot. The syntax of the property assignment follows + closely the syntax of assignments in unit files. - - Suppress printing of the results of various commands - and also the hints about truncated log lines. This does not - suppress output of commands for which the printed output is - the only result (like show). Errors are - always printed. - - + Example: systemctl set-property foobar.service CPUWeight=200 - - + If the specified unit appears to be inactive, the + changes will be only stored on disk as described + previously hence they will be effective when the unit will + be started. - - Do not synchronously wait for the requested operation - to finish. If this is not specified, the job will be - verified, enqueued and systemctl will - wait until the unit's start-up is completed. By passing this - argument, it is only verified and enqueued. This option may not be - combined with . - - + Note that this command allows changing multiple properties at the same time, which is + preferable over setting them individually. - - + Example: systemctl set-property foobar.service CPUWeight=200 MemoryMax=2G IPAccounting=yes - - Synchronously wait for started units to terminate again. - This option may not be combined with . - Note that this will wait forever if any given unit never terminates - (by itself or by getting stopped explicitly); particularly services - which use RemainAfterExit=yes. + Like with unit file configuration settings, assigning an empty setting usually resets a + property to its defaults. - When used with is-system-running, wait - until the boot process is completed before returning. - - + Example: systemctl set-property avahi-daemon.service IPAddressDeny= + + - - + + help PATTERN…|PID… - - + + Show manual pages for one or more units, if + available. If a PID is given, the manual pages for the unit + the process belongs to are shown. + + - - List units in failed state. This is equivalent to - . - - + + reset-failed [PATTERN…] - - + + Reset the failed state of the specified units, or if no unit name is passed, reset + the state of all units. When a unit fails in some way (i.e. process exiting with non-zero error code, + terminating abnormally or timing out), it will automatically enter the failed state and + its exit code and status is recorded for introspection by the administrator until the service is + stopped/re-started or reset with this command. - - Do not send wall message before halt, power-off and reboot. - - + In addition to resetting the failed state of a unit it also resets various other + per-unit properties: the start rate limit counter of all unit types is reset to zero, as is the restart + counter of service units. Thus, if a unit's start limit (as configured with + StartLimitIntervalSec=/StartLimitBurst=) is hit and the unit refuses + to be started again, use this command to make it startable again. + + - - + + + list-dependencies + UNIT + - - When used with enable and - disable, operate on the global user - configuration directory, thus enabling or disabling a unit - file globally for all future logins of all users. - - + + Shows units required and wanted by the specified + unit. This recursively lists units following the + Requires=, + Requisite=, + ConsistsOf=, + Wants=, BindsTo= + dependencies. If no unit is specified, + default.target is implied. - - + By default, only target units are recursively + expanded. When is passed, all other + units are recursively expanded as well. - - When used with enable and - disable, do not implicitly reload daemon - configuration after executing the changes. - - + Options , + , + may be used to change what types of dependencies + are shown. - - + Note that this command only lists units currently loaded into memory by the service manager. In + particular, this command is not suitable to get a comprehensive list at all reverse dependencies on a + specific unit, as it won't list the dependencies declared by units currently not loaded. + + + + - - When used with start and related - commands, disables asking for passwords. Background services - may require input of a password or passphrase string, for - example to unlock system hard disks or cryptographic - certificates. Unless this option is specified and the - command is invoked from a terminal, - systemctl will query the user on the - terminal for the necessary secrets. Use this option to - switch this behavior off. In this case, the password must be - supplied by some other means (for example graphical password - agents) or the service might fail. This also disables - querying the user for authentication for privileged - operations. - - + + Unit File Commands - - + + + list-unit-files PATTERN… - - When used with kill, choose which - processes to send a signal to. Must be one of - , or - to select whether to kill only the main - process, the control process or all processes of the - unit. The main process of the unit is the one that defines - the life-time of it. A control process of a unit is one that - is invoked by the manager to induce state changes of it. For - example, all processes started due to the - ExecStartPre=, - ExecStop= or - ExecReload= settings of service units are - control processes. Note that there is only one control - process per unit at a time, as only one state change is - executed at a time. For services of type - Type=forking, the initial process started - by the manager for ExecStart= is a - control process, while the process ultimately forked off by - that one is then considered the main process of the unit (if - it can be determined). This is different for service units - of other types, where the process forked off by the manager - for ExecStart= is always the main process - itself. A service unit consists of zero or one main process, - zero or one control process plus any number of additional - processes. Not all unit types manage processes of these - types however. For example, for mount units, control processes - are defined (which are the invocations of - &MOUNT_PATH; and - &UMOUNT_PATH;), but no main process - is defined. If omitted, defaults to - . - + + List unit files installed on the system, in combination with their enablement state (as reported by + is-enabled). If one or more PATTERNs are specified, only unit + files whose name matches one of them are shown (patterns matching unit file system paths are not + supported). + + - + + enable UNIT… + enable PATH… - - - + + Enable one or more units or unit instances. This will create a set of symlinks, as encoded in the + [Install] sections of the indicated unit files. After the symlinks have been created, + the system manager configuration is reloaded (in a way equivalent to daemon-reload), in + order to ensure the changes are taken into account immediately. Note that this does + not have the effect of also starting any of the units being enabled. If this is + desired, combine this command with the switch, or invoke start + with appropriate arguments later. Note that in case of unit instance enablement (i.e. enablement of units of + the form foo@bar.service), symlinks named the same as instances are created in the + unit configuration directory, however they point to the single template unit file they are instantiated + from. - - When used with kill, choose which - signal to send to selected processes. Must be one of the - well-known signal specifiers such as SIGTERM, SIGINT or - SIGSTOP. If omitted, defaults to - . - - + This command expects either valid unit names (in which case various unit file directories are + automatically searched for unit files with appropriate names), or absolute paths to unit files (in which + case these files are read directly). If a specified unit file is located outside of the usual unit file + directories, an additional symlink is created, linking it into the unit configuration path, thus ensuring + it is found when requested by commands such as start. The file system where the linked + unit files are located must be accessible when systemd is started (e.g. anything underneath + /home or /var is not allowed, unless those directories are + located on the root file system). - - + This command will print the file system operations executed. This output may be suppressed by passing + . + - - Select what type of per-unit resources to remove when the clean command is - invoked, see below. Takes one of configuration, state, - cache, logs, runtime to select the - type of resource. This option may be specified more than once, in which case all specified resource - types are removed. Also accepts the special value all as a shortcut for - specifiying all five resource types. If this option is not specified defaults to the combination of - cache and runtime, i.e. the two kinds of resources that - are generally considered to be redundant and can be reconstructed on next invocation. - - + Note that this operation creates only the symlinks suggested in the [Install] + section of the unit files. While this command is the recommended way to manipulate the unit configuration + directory, the administrator is free to make additional changes manually by placing or removing symlinks + below this directory. This is particularly useful to create configurations that deviate from the suggested + default installation. In this case, the administrator must make sure to invoke + daemon-reload manually as necessary, in order to ensure the changes are taken into + account. + - - - + Enabling units should not be confused with starting (activating) units, as done by the + start command. Enabling and starting units is orthogonal: units may be enabled without + being started and started without being enabled. Enabling simply hooks the unit into various suggested + places (for example, so that the unit is automatically started on boot or when a particular kind of + hardware is plugged in). Starting actually spawns the daemon process (in case of service units), or binds + the socket (in case of socket units), and so on. - - When used with enable, overwrite - any existing conflicting symlinks. + Depending on whether , , , + or is specified, this enables the unit for the system, for the calling user only, + for only this boot of the system, or for all future logins of all users. Note that in the last case, no + systemd daemon configuration is reloaded. - When used with edit, create all of the - specified units which do not already exist. + Using enable on masked units is not supported and results in an error. + + - When used with halt, poweroff, reboot or - kexec, execute the selected operation without shutting down all units. However, all - processes will be killed forcibly and all file systems are unmounted or remounted read-only. This is hence a - drastic but relatively safe option to request an immediate reboot. If is specified - twice for these operations (with the exception of kexec), they will be executed - immediately, without terminating any processes or unmounting any file systems. Warning: specifying - twice with any of these operations might result in data loss. Note that when - is specified twice the selected operation is executed by - systemctl itself, and the system manager is not contacted. This means the command should - succeed even when the system manager has crashed. - - + + disable UNIT… - - + + Disables one or more units. This removes all symlinks to the unit files backing the specified units + from the unit configuration directory, and hence undoes any changes made by enable or + link. Note that this removes all symlinks to matching unit files, + including manually created symlinks, and not just those actually created by enable or + link. Note that while disable undoes the effect of + enable, the two commands are otherwise not symmetric, as disable may + remove more symlinks than a prior enable invocation of the same unit created. - - When used with halt, poweroff or reboot, set a - short message explaining the reason for the operation. The message will be logged together with the default - shutdown message. - - + This command expects valid unit names only, it does not accept paths to unit files. - - + In addition to the units specified as arguments, all units are disabled that are listed in the + Also= setting contained in the [Install] section of any of the unit + files being operated on. - - When used with enable, the units - will also be started. When used with disable or - mask, the units will also be stopped. The start - or stop operation is only carried out when the respective enable or - disable operation has been successful. - - + This command implicitly reloads the system manager configuration after completing the operation. Note + that this command does not implicitly stop the units that are being disabled. If this is desired, either + combine this command with the switch, or invoke the stop command + with appropriate arguments later. - - + This command will print information about the file system operations (symlink removals) + executed. This output may be suppressed by passing . + - - When used with - enable/disable/is-enabled - (and related commands), use the specified root path when looking for unit - files. If this option is present, systemctl will operate on - the file system directly, instead of communicating with the systemd - daemon to carry out changes. - + This command honors , , + and in a similar way as enable. + + - + + reenable UNIT… - - + + Reenable one or more units, as specified on the command line. This is a combination of + disable and enable and is useful to reset the symlinks a unit file is + enabled with to the defaults configured in its [Install] section. This command expects + a unit name only, it does not accept paths to unit files. + + - - When used with enable, - disable, edit, - (and related commands), make changes only temporarily, so - that they are lost on the next reboot. This will have the - effect that changes are not made in subdirectories of - /etc but in /run, - with identical immediate effects, however, since the latter - is lost on reboot, the changes are lost too. + + preset UNIT… - Similarly, when used with - set-property, make changes only - temporarily, so that they are lost on the next - reboot. - - + + Reset the enable/disable status one or more unit files, as specified on + the command line, to the defaults configured in the preset policy files. This + has the same effect as disable or + enable, depending how the unit is listed in the preset + files. - - + Use to control whether units shall be + enabled and disabled, or only enabled, or only disabled. - - Takes one of full (the default), - enable-only, - disable-only. When used with the - preset or preset-all - commands, controls whether units shall be disabled and - enabled according to the preset rules, or only enabled, or - only disabled. - - + If the unit carries no install information, it will be silently ignored + by this command. UNIT must be the real unit name, + any alias names are ignored silently. - - - + For more information on the preset policy format, see + systemd.preset5. + For more information on the concept of presets, please consult the + Preset + document. + + - - When used with status, controls the number of journal lines to show, counting from - the most recent ones. Takes a positive integer argument, or 0 to disable journal output. Defaults to - 10. - - + + preset-all - - - + + Resets all installed unit files to the defaults + configured in the preset policy file (see above). - - When used with status, controls the - formatting of the journal entries that are shown. For the - available choices, see - journalctl1. - Defaults to short. - - - - - - - - When used with the reboot command, indicate to the system's firmware to reboot into - the firmware setup interface. Note that this functionality is not available on all systems. - - - - - - - - When used with the reboot command, indicate to the system's boot loader to show the - boot loader menu on the following boot. Takes a time value as parameter — indicating the menu time-out. Pass - zero in order to disable the menu time-out. Note that not all boot loaders support this - functionality. - - - - - - - - When used with the reboot command, indicate to the system's boot loader to boot into - a specific boot loader entry on the following boot. Takes a boot loader entry identifier as argument, or - help in order to list available entries. Note that not all boot loaders support this - functionality. - - - - - - - - When used with list-dependencies, - list-units or list-machines, - the output is printed as a list instead of a tree, and the bullet - circles are omitted. - - - - - - - - - - - - - - - Commands - - The following commands are understood: - - - Unit Commands + Use to control + whether units shall be enabled and disabled, or only + enabled, or only disabled. + + - - list-units PATTERN… + is-enabled UNIT… - List units that systemd currently has in memory. This includes units that are - either referenced directly or through a dependency, units that are pinned by applications programmatically, - or units that were active in the past and have failed. By default only units which are active, have pending - jobs, or have failed are shown; this can be changed with option . If one or more - PATTERNs are specified, only units matching one of them are shown. The units - that are shown are additionally filtered by and if those - options are specified. - - Produces output similar to - UNIT LOAD ACTIVE SUB DESCRIPTION - sys-module-fuse.device loaded active plugged /sys/module/fuse - -.mount loaded active mounted Root Mount - boot-efi.mount loaded active mounted /boot/efi - systemd-journald.service loaded active running Journal Service - systemd-logind.service loaded active running Login Service -● user@1000.service loaded failed failed User Manager for UID 1000 - … - systemd-tmpfiles-clean.timer loaded active waiting Daily Cleanup of Temporary Directories - -LOAD = Reflects whether the unit definition was properly loaded. -ACTIVE = The high-level unit activation state, i.e. generalization of SUB. -SUB = The low-level unit activation state, values depend on unit type. + Checks whether any of the specified unit files are + enabled (as with enable). Returns an + exit code of 0 if at least one is enabled, non-zero + otherwise. Prints the current enable status (see table). + To suppress this output, use . + To show installation targets, use . + -123 loaded units listed. Pass --all to see loaded but inactive units, too. -To show all installed unit files use 'systemctl list-unit-files'. - - The header and the last unit of a given type are underlined if the - terminal supports that. A colored dot is shown next to services which - were masked, not found, or otherwise failed. + + + <command>is-enabled</command> output + - The LOAD column shows the load state, one of loaded, - not-found, bad-setting, error, - masked. The ACTIVE columns shows the general unit state, one of - active, reloading, inactive, - failed, activating, deactivating. The SUB - column shows the unit-type-specific detailed state of the unit, possible values vary by unit type. The list - of possible LOAD, ACTIVE, and SUB states is not constant and new systemd releases may both add and remove - values. systemctl --state=help command maybe be used to display the - current set of possible values. + + + + Name + Description + Exit Code + + + + + enabled + Enabled via .wants/, .requires/ or Alias= symlinks (permanently in /etc/systemd/system/, or transiently in /run/systemd/system/). + 0 + + + enabled-runtime + + + linked + Made available through one or more symlinks to the unit file (permanently in /etc/systemd/system/ or transiently in /run/systemd/system/), even though the unit file might reside outside of the unit file search path. + > 0 + + + linked-runtime + + + masked + Completely disabled, so that any start operation on it fails (permanently in /etc/systemd/system/ or transiently in /run/systemd/systemd/). + > 0 + + + masked-runtime + + + static + The unit file is not enabled, and has no provisions for enabling in the [Install] unit file section. + 0 + + + indirect + The unit file itself is not enabled, but it has a non-empty Also= setting in the [Install] unit file section, listing other unit files that might be enabled, or it has an alias under a different name through a symlink that is not specified in Also=. For template unit file, an instance different than the one specified in DefaultInstance= is enabled. + 0 + + + disabled + The unit file is not enabled, but contains an [Install] section with installation instructions. + > 0 + + + generated + The unit file was generated dynamically via a generator tool. See systemd.generator7. Generated unit files may not be enabled, they are enabled implicitly by their generator. + 0 + + + transient + The unit file has been created dynamically with the runtime API. Transient units may not be enabled. + 0 + + + bad + The unit file is invalid or another error occurred. Note that is-enabled will not actually return this state, but print an error message instead. However the unit file listing printed by list-unit-files might show it. + > 0 + + + +
- This is the default command.
- list-sockets PATTERN… + mask UNIT… - List socket units currently in memory, ordered by listening address. If one or more - PATTERNs are specified, only socket units matching one of them are - shown. Produces output similar to - -LISTEN UNIT ACTIVATES -/dev/initctl systemd-initctl.socket systemd-initctl.service -… -[::]:22 sshd.socket sshd.service -kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service - -5 sockets listed. - Note: because the addresses might contains spaces, this output - is not suitable for programmatic consumption. - - - Also see , , and . + Mask one or more units, as specified on the command line. This will link these unit files to + /dev/null, making it impossible to start them. This is a stronger version of + disable, since it prohibits all kinds of activation of the unit, including enablement + and manual activation. Use this option with care. This honors the option to only + mask temporarily until the next reboot of the system. The option may be used to + ensure that the units are also stopped. This command expects valid unit names only, it does not accept unit + file paths. - list-timers PATTERN… + unmask UNIT… - List timer units currently in memory, ordered by the time they elapse next. If one or more - PATTERNs are specified, only units matching one of them are shown. - Produces output similar to - -NEXT LEFT LAST PASSED UNIT ACTIVATES -n/a n/a Thu 2017-02-23 13:40:29 EST 3 days ago ureadahead-stop.timer ureadahead-stop.service -Sun 2017-02-26 18:55:42 EST 1min 14s left Thu 2017-02-23 13:54:44 EST 3 days ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service -Sun 2017-02-26 20:37:16 EST 1h 42min left Sun 2017-02-26 11:56:36 EST 6h ago apt-daily.timer apt-daily.service -Sun 2017-02-26 20:57:49 EST 2h 3min left Sun 2017-02-26 11:56:36 EST 6h ago snapd.refresh.timer snapd.refresh.service - - + Unmask one or more unit files, as specified on the command line. This will undo the effect of + mask. This command expects valid unit names only, it does not accept unit file + paths. + + - NEXT shows the next time the timer will run. - LEFT shows how long till the next time the timer runs. - LAST shows the last time the timer ran. - PASSED shows how long has passed since the timer last ran. - UNIT shows the name of the timer - ACTIVATES shows the name the service the timer activates when it runs. + + link PATH… - Also see and . + + Link a unit file that is not in the unit file search paths into the unit file search path. This + command expects an absolute path to a unit file. The effect of this may be undone with + disable. The effect of this command is that a unit file is made available for commands + such as start, even though it is not installed directly in the unit search path. The + file system where the linked unit files are located must be accessible when systemd is started + (e.g. anything underneath /home or /var is not allowed, unless + those directories are located on the root file system). - start PATTERN… + revert UNIT… - Start (activate) one or more units specified on the - command line. - - Note that glob patterns operate on the set of primary names of units currently in memory. Units which - are not active and are not in a failed state usually are not in memory, and will not be matched by any - pattern. In addition, in case of instantiated units, systemd is often unaware of the instance name until - the instance has been started. Therefore, using glob patterns with start has limited - usefulness. Also, secondary alias names of units are not considered. + Revert one or more unit files to their vendor versions. This command removes drop-in configuration + files that modify the specified units, as well as any user-configured unit file that overrides a matching + vendor supplied unit file. Specifically, for a unit foo.service the matching directories + foo.service.d/ with all their contained files are removed, both below the persistent and + runtime configuration directories (i.e. below /etc/systemd/system and + /run/systemd/system); if the unit file has a vendor-supplied version (i.e. a unit file + located below /usr) any matching persistent or runtime unit file that overrides it is + removed, too. Note that if a unit file has no vendor-supplied version (i.e. is only defined below + /etc/systemd/system or /run/systemd/system, but not in a unit + file stored below /usr), then it is not removed. Also, if a unit is masked, it is + unmasked. + + Effectively, this command may be used to undo all changes made with systemctl + edit, systemctl set-property and systemctl mask and puts + the original unit file with its settings back in effect. + - stop PATTERN… + add-wants TARGET + UNIT… + add-requires TARGET + UNIT… - Stop (deactivate) one or more units specified on the command line. + Adds Wants= or Requires= + dependencies, respectively, to the specified + TARGET for one or more units. + + This command honors , + , and + in a way similar to + enable. - This command will fail if the unit does not exist or if stopping of the unit is prohibited (see - RefuseManualStop= in - systemd.unit5). - It will not fail if any of the commands configured to stop the unit - (ExecStop=, etc.) fail, because the manager will still forcibly terminate the - unit. + - reload PATTERN… + edit UNIT… - Asks all units listed on the command line to reload - their configuration. Note that this will reload the - service-specific configuration, not the unit configuration - file of systemd. If you want systemd to reload the - configuration file of a unit, use the - daemon-reload command. In other words: - for the example case of Apache, this will reload Apache's - httpd.conf in the web server, not the - apache.service systemd unit - file. + Edit a drop-in snippet or a whole replacement file if + is specified, to extend or override the + specified unit. - This command should not be confused with the - daemon-reload command. - + Depending on whether (the default), + , or is specified, + this command creates a drop-in file for each unit either for the system, + for the calling user, or for all futures logins of all users. Then, + the editor (see the "Environment" section below) is invoked on + temporary files which will be written to the real location if the + editor exits successfully. - - - restart PATTERN… + If is specified, this will copy the + original units instead of creating drop-in files. - - Stop and then start one or more units specified on the command line. If the units are not running - yet, they will be started. + If is specified and any units do + not already exist, new unit files will be opened for editing. - Note that restarting a unit with this command does not necessarily flush out all of the unit's - resources before it is started again. For example, the per-service file descriptor storage facility (see - FileDescriptorStoreMax= in - systemd.service5) will - remain intact as long as the unit has a job pending, and is only cleared when the unit is fully stopped and - no jobs are pending anymore. If it is intended that the file descriptor store is flushed out, too, during a - restart operation an explicit systemctl stop command followed by systemctl - start should be issued. + If is specified, the changes will + be made temporarily in /run and they will be + lost on the next reboot. + + If the temporary file is empty upon exit, the modification of + the related unit is canceled. + + After the units have been edited, systemd configuration is + reloaded (in a way that is equivalent to daemon-reload). + + + Note that this command cannot be used to remotely edit units + and that you cannot temporarily edit units which are in + /etc, since they take precedence over + /run. + - try-restart PATTERN… + get-default - Stop and then start one or more units specified on the - command line if the units are running. This does nothing - if units are not running. - + Return the default target to boot into. This returns + the target unit name default.target + is aliased (symlinked) to. + - reload-or-restart PATTERN… + set-default TARGET - Reload one or more units if they support it. If not, stop and then start them instead. If the units - are not running yet, they will be started. + Set the default target to boot into. This sets + (symlinks) the default.target alias + to the given target unit. + +
+
+ + + Machine Commands + + - try-reload-or-restart PATTERN… + list-machines PATTERN… - Reload one or more units if they support it. If not, stop and then start them instead. This does - nothing if the units are not running. - + List the host and all running local containers with + their state. If one or more + PATTERNs are specified, only + containers matching one of them are shown. + + + + + + Job Commands + + - isolate UNIT + list-jobs PATTERN… - Start the unit specified on the command line and its dependencies - and stop all others, unless they have - (see - systemd.unit5). - If a unit name with no extension is given, an extension of - .target will be assumed. - - This is similar to changing the runlevel in a - traditional init system. The isolate - command will immediately stop processes that are not enabled - in the new unit, possibly including the graphical - environment or terminal you are currently using. + List jobs that are in progress. If one or more + PATTERNs are specified, only + jobs for units matching one of them are shown. - Note that this is allowed only on units where - is enabled. See - systemd.unit5 - for details. + When combined with or the list is augmented with + information on which other job each job is waiting for, and which other jobs are waiting for it, see + above. - kill PATTERN… + cancel JOB… - Send a signal to one or more processes of the - unit. Use to select which - process to kill. Use to select - the signal to send. + Cancel one or more jobs specified on the command line + by their numeric job IDs. If no job ID is specified, cancel + all pending jobs. + + + + + Environment Commands + + - clean PATTERN… + show-environment - Remove the configuration, state, cache, logs or runtime data of the specified units. Use - to select which kind of resource to remove. For service units this may - be used to remove the directories configured with ConfigurationDirectory=, - StateDirectory=, CacheDirectory=, - LogsDirectory= and RuntimeDirectory=, see - systemd.exec5 - for details. For timer units this may be used to clear out the persistent timestamp data if - Persistent= is used and is selected, see - systemd.timer5. This - command only applies to units that use either of these settings. If is - not specified, both the cache and runtime data are removed (as these two types of data are - generally redundant and reproducible on the next invocation of the unit). + Dump the systemd manager environment block. This is the environment + block that is passed to all processes the manager spawns. The environment + block will be dumped in straight-forward form suitable for sourcing into + most shells. If no special characters or whitespace is present in the variable + values, no escaping is performed, and the assignments have the form + VARIABLE=value. If whitespace or characters which have + special meaning to the shell are present, dollar-single-quote escaping is + used, and assignments have the form VARIABLE=$'value'. + This syntax is known to be supported by + bash1, + zsh1, + ksh1, + and + busybox1's + ash1, + but not + dash1 + or + fish1. + - is-active PATTERN… + set-environment VARIABLE=VALUE… - Check whether any of the specified units are active - (i.e. running). Returns an exit code - 0 if at least one is active, or - non-zero otherwise. Unless is - specified, this will also print the current unit state to - standard output. + Set one or more systemd manager environment variables, + as specified on the command line. - is-failed PATTERN… + unset-environment VARIABLE… - Check whether any of the specified units are in a - "failed" state. Returns an exit code - 0 if at least one has failed, - non-zero otherwise. Unless is - specified, this will also print the current unit state to - standard output. + Unset one or more systemd manager environment + variables. If only a variable name is specified, it will be + removed regardless of its value. If a variable and a value + are specified, the variable is only removed if it has the + specified value. - status PATTERN…|PID…] + + import-environment + VARIABLE… + - Show terse runtime status information about one or - more units, followed by most recent log data from the - journal. If no units are specified, show system status. If - combined with , also show the status of - all units (subject to limitations specified with - ). If a PID is passed, show information - about the unit the process belongs to. - - This function is intended to generate human-readable - output. If you are looking for computer-parsable output, - use show instead. By default, this - function only shows 10 lines of output and ellipsizes - lines to fit in the terminal window. This can be changed - with and , - see above. In addition, journalctl - --unit=NAME or - journalctl - --user-unit=NAME use - a similar filter for messages and might be more - convenient. - - - systemd implicitly loads units as necessary, so just running the status will - attempt to load a file. The command is thus not useful for determining if something was already loaded or - not. The units may possibly also be quickly unloaded after the operation is completed if there's no reason - to keep it in memory thereafter. - - - - Example output from systemctl status - - $ systemctl status bluetooth -● bluetooth.service - Bluetooth service - Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) - Active: active (running) since Wed 2017-01-04 13:54:04 EST; 1 weeks 0 days ago - Docs: man:bluetoothd(8) - Main PID: 930 (bluetoothd) - Status: "Running" - Tasks: 1 - Memory: 648.0K - CPU: 435ms - CGroup: /system.slice/bluetooth.service - └─930 /usr/lib/bluetooth/bluetoothd - -Jan 12 10:46:45 example.com bluetoothd[8900]: Not enough free handles to register service -Jan 12 10:46:45 example.com bluetoothd[8900]: Current Time Service could not be registered -Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output error (5) - - - The dot ("●") uses color on supported terminals to summarize the unit state at a glance. White - indicates an inactive or deactivating state. Red indicates a - failed or error state and green indicates an - active, reloading or activating state. - - - The "Loaded:" line in the output will show loaded if the unit has been loaded into - memory. Other possible values for "Loaded:" include: error if there was a problem - loading it, not-found if not unit file was found for this unit, - bad-setting if an essential unit file setting could not be parsed and - masked if the unit file has been masked. Along with showing the path to the unit file, - this line will also show the enablement state. Enabled commands start at boot. See the full table of - possible enablement states — including the definition of masked — in the documentation - for the is-enabled command. - - - The "Active:" line shows active state. The value is usually active or - inactive. Active could mean started, bound, plugged in, etc depending on the unit type. - The unit could also be in process of changing states, reporting a state of activating or - deactivating. A special failed state is entered when the service - failed in some way, such as a crash, exiting with an error code or timing out. If the failed state is - entered the cause will be logged for later reference. - - + Import all, one or more environment variables set on + the client into the systemd manager environment block. If + no arguments are passed, the entire environment block is + imported. Otherwise, a list of one or more environment + variable names should be passed, whose client-side values + are then imported into the manager's environment + block. + + + + + Manager Lifecycle Commands + + - show PATTERN…|JOB… + daemon-reload - Show properties of one or more units, jobs, or the manager itself. If no argument is specified, - properties of the manager will be shown. If a unit name is specified, properties of the unit are shown, and - if a job ID is specified, properties of the job are shown. By default, empty properties are suppressed. Use - to show those too. To select specific properties to show, use - . This command is intended to be used whenever computer-parsable output is - required. Use status if you are looking for formatted human-readable output. + Reload the systemd manager configuration. This will + rerun all generators (see + systemd.generator7), + reload all unit files, and recreate the entire dependency + tree. While the daemon is being reloaded, all sockets + systemd listens on behalf of user configuration will stay + accessible. - Many properties shown by systemctl show map directly to configuration settings of - the system and service manager and its unit files. Note that the properties shown by the command are - generally more low-level, normalized versions of the original configuration settings and expose runtime - state in addition to configuration. For example, properties shown for service units include the service's - current main process identifier as MainPID (which is runtime state), and time settings - are always exposed as properties ending in the …USec suffix even if a matching - configuration options end in …Sec, because microseconds is the normalized time unit used - by the system and service manager. + This command should not be confused with the + reload command. - cat PATTERN… + daemon-reexec - Show backing files of one or more units. Prints the - "fragment" and "drop-ins" (source files) of units. Each - file is preceded by a comment which includes the file - name. Note that this shows the contents of the backing files - on disk, which may not match the system manager's - understanding of these units if any unit files were - updated on disk and the daemon-reload - command wasn't issued since. + Reexecute the systemd manager. This will serialize the + manager state, reexecute the process and deserialize the + state again. This command is of little use except for + debugging and package upgrades. Sometimes, it might be + helpful as a heavy-weight daemon-reload. + While the daemon is being reexecuted, all sockets systemd listening + on behalf of user configuration will stay accessible. + - - set-property UNIT PROPERTY=VALUE… - - - Set the specified unit properties at runtime where - this is supported. This allows changing configuration - parameter properties such as resource control settings at - runtime. Not all properties may be changed at runtime, but - many resource control settings (primarily those in - systemd.resource-control5) - may. The changes are applied immediately, and stored on disk - for future boots, unless is - passed, in which case the settings only apply until the - next reboot. The syntax of the property assignment follows - closely the syntax of assignments in unit files. - - Example: systemctl set-property foobar.service CPUWeight=200 + + - If the specified unit appears to be inactive, the - changes will be only stored on disk as described - previously hence they will be effective when the unit will - be started. + + System Commands - Note that this command allows changing multiple properties at the same time, which is - preferable over setting them individually. + + + is-system-running - Example: systemctl set-property foobar.service CPUWeight=200 MemoryMax=2G IPAccounting=yes + + Checks whether the system is operational. This + returns success (exit code 0) when the system is fully up + and running, specifically not in startup, shutdown or + maintenance mode, and with no failed services. Failure is + returned otherwise (exit code non-zero). In addition, the + current state is printed in a short string to standard + output, see the table below. Use to + suppress this output. - Like with unit file configuration settings, assigning an empty setting usually resets a - property to its defaults. + Use to wait until the boot + process is completed before printing the current state and + returning the appropriate error status. If + is in use, states initializing or + starting will not be reported, instead + the command will block until a later state (such as + running or degraded) + is reached. - Example: systemctl set-property avahi-daemon.service IPAddressDeny= + + <command>is-system-running</command> output + + + + + + + Name + Description + Exit Code + + + + + initializing + Early bootup, before + basic.target is reached + or the maintenance state entered. + + > 0 + + + starting + Late bootup, before the job queue + becomes idle for the first time, or one of the + rescue targets are reached. + > 0 + + + running + The system is fully + operational. + 0 + + + degraded + The system is operational but one or more + units failed. + > 0 + + + maintenance + The rescue or emergency target is + active. + > 0 + + + stopping + The manager is shutting + down. + > 0 + + + offline + The manager is not + running. Specifically, this is the operational + state if an incompatible program is running as + system manager (PID 1). + > 0 + + + unknown + The operational state could not be + determined, due to lack of resources or another + error cause. + > 0 + + + +
- help PATTERN…|PID… + default - Show manual pages for one or more units, if - available. If a PID is given, the manual pages for the unit - the process belongs to are shown. + Enter default mode. This is equivalent to systemctl isolate default.target. This + operation is blocking by default, use to request asynchronous behavior. - reset-failed [PATTERN…] + rescue - Reset the failed state of the specified units, or if no unit name is passed, reset - the state of all units. When a unit fails in some way (i.e. process exiting with non-zero error code, - terminating abnormally or timing out), it will automatically enter the failed state and - its exit code and status is recorded for introspection by the administrator until the service is - stopped/re-started or reset with this command. - - In addition to resetting the failed state of a unit it also resets various other - per-unit properties: the start rate limit counter of all unit types is reset to zero, as is the restart - counter of service units. Thus, if a unit's start limit (as configured with - StartLimitIntervalSec=/StartLimitBurst=) is hit and the unit refuses - to be started again, use this command to make it startable again. + Enter rescue mode. This is equivalent to systemctl isolate rescue.target. This + operation is blocking by default, use to request asynchronous behavior. - - - list-dependencies - UNIT - + emergency - Shows units required and wanted by the specified - unit. This recursively lists units following the - Requires=, - Requisite=, - ConsistsOf=, - Wants=, BindsTo= - dependencies. If no unit is specified, - default.target is implied. - - By default, only target units are recursively - expanded. When is passed, all other - units are recursively expanded as well. - - Options , - , - may be used to change what types of dependencies - are shown. - - Note that this command only lists units currently loaded into memory by the service manager. In - particular, this command is not suitable to get a comprehensive list at all reverse dependencies on a - specific unit, as it won't list the dependencies declared by units currently not loaded. + Enter emergency mode. This is equivalent to systemctl isolate + emergency.target. This operation is blocking by default, use to + request asynchronous behavior. -
-
- - - Unit File Commands - - - list-unit-files PATTERN… + halt - List unit files installed on the system, in combination with their enablement state (as reported by - is-enabled). If one or more PATTERNs are specified, only unit - files whose name matches one of them are shown (patterns matching unit file system paths are not - supported). + Shut down and halt the system. This is mostly equivalent to systemctl start halt.target + --job-mode=replace-irreversibly --no-block, but also prints a wall message to all users. This command is + asynchronous; it will return after the halt operation is enqueued, without waiting for it to complete. Note + that this operation will simply halt the OS kernel after shutting down, leaving the hardware powered + on. Use systemctl poweroff for powering off the system (see below). + + If combined with , shutdown of all running services is skipped, however all + processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the + system halt. If is specified twice, the operation is immediately executed without + terminating any processes or unmounting any file systems. This may result in data loss. Note that when + is specified twice the halt operation is executed by systemctl + itself, and the system manager is not contacted. This means the command should succeed even when the system + manager has crashed. - - enable UNIT… - enable PATH… + poweroff - Enable one or more units or unit instances. This will create a set of symlinks, as encoded in the - [Install] sections of the indicated unit files. After the symlinks have been created, - the system manager configuration is reloaded (in a way equivalent to daemon-reload), in - order to ensure the changes are taken into account immediately. Note that this does - not have the effect of also starting any of the units being enabled. If this is - desired, combine this command with the switch, or invoke start - with appropriate arguments later. Note that in case of unit instance enablement (i.e. enablement of units of - the form foo@bar.service), symlinks named the same as instances are created in the - unit configuration directory, however they point to the single template unit file they are instantiated - from. - - This command expects either valid unit names (in which case various unit file directories are - automatically searched for unit files with appropriate names), or absolute paths to unit files (in which - case these files are read directly). If a specified unit file is located outside of the usual unit file - directories, an additional symlink is created, linking it into the unit configuration path, thus ensuring - it is found when requested by commands such as start. The file system where the linked - unit files are located must be accessible when systemd is started (e.g. anything underneath - /home or /var is not allowed, unless those directories are - located on the root file system). - - This command will print the file system operations executed. This output may be suppressed by passing - . - + Shut down and power-off the system. This is mostly equivalent to systemctl start + poweroff.target --job-mode=replace-irreversibly --no-block, but also prints a wall message to all + users. This command is asynchronous; it will return after the power-off operation is enqueued, without + waiting for it to complete. - Note that this operation creates only the symlinks suggested in the [Install] - section of the unit files. While this command is the recommended way to manipulate the unit configuration - directory, the administrator is free to make additional changes manually by placing or removing symlinks - below this directory. This is particularly useful to create configurations that deviate from the suggested - default installation. In this case, the administrator must make sure to invoke - daemon-reload manually as necessary, in order to ensure the changes are taken into - account. - + If combined with , shutdown of all running services is skipped, however all + processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the + powering off. If is specified twice, the operation is immediately executed without + terminating any processes or unmounting any file systems. This may result in data loss. Note that when + is specified twice the power-off operation is executed by + systemctl itself, and the system manager is not contacted. This means the command should + succeed even when the system manager has crashed. + + + + reboot arg - Enabling units should not be confused with starting (activating) units, as done by the - start command. Enabling and starting units is orthogonal: units may be enabled without - being started and started without being enabled. Enabling simply hooks the unit into various suggested - places (for example, so that the unit is automatically started on boot or when a particular kind of - hardware is plugged in). Starting actually spawns the daemon process (in case of service units), or binds - the socket (in case of socket units), and so on. + + Shut down and reboot the system. This is mostly equivalent to systemctl start reboot.target + --job-mode=replace-irreversibly --no-block, but also prints a wall message to all users. This + command is asynchronous; it will return after the reboot operation is enqueued, without waiting for it to + complete. - Depending on whether , , , - or is specified, this enables the unit for the system, for the calling user only, - for only this boot of the system, or for all future logins of all users. Note that in the last case, no - systemd daemon configuration is reloaded. + If combined with , shutdown of all running services is skipped, however all + processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the + reboot. If is specified twice, the operation is immediately executed without + terminating any processes or unmounting any file systems. This may result in data loss. Note that when + is specified twice the reboot operation is executed by + systemctl itself, and the system manager is not contacted. This means the command should + succeed even when the system manager has crashed. - Using enable on masked units is not supported and results in an error. + If the optional argument arg is given, it will be passed as the optional + argument to the reboot2 + system call. The value is architecture and firmware specific. As an example, recovery + might be used to trigger system recovery, and fota might be used to trigger a + firmware over the air update. - disable UNIT… + kexec - Disables one or more units. This removes all symlinks to the unit files backing the specified units - from the unit configuration directory, and hence undoes any changes made by enable or - link. Note that this removes all symlinks to matching unit files, - including manually created symlinks, and not just those actually created by enable or - link. Note that while disable undoes the effect of - enable, the two commands are otherwise not symmetric, as disable may - remove more symlinks than a prior enable invocation of the same unit created. - - This command expects valid unit names only, it does not accept paths to unit files. + Shut down and reboot the system via kexec. This is equivalent to + systemctl start kexec.target --job-mode=replace-irreversibly --no-block. This command is + asynchronous; it will return after the reboot operation is enqueued, without waiting for it to + complete. - In addition to the units specified as arguments, all units are disabled that are listed in the - Also= setting contained in the [Install] section of any of the unit - files being operated on. + If combined with , shutdown of all running services is skipped, however all + processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the + reboot. + + - This command implicitly reloads the system manager configuration after completing the operation. Note - that this command does not implicitly stop the units that are being disabled. If this is desired, either - combine this command with the switch, or invoke the stop command - with appropriate arguments later. + + exit EXIT_CODE - This command will print information about the file system operations (symlink removals) - executed. This output may be suppressed by passing . - + + Ask the service manager to quit. This is only supported for user service managers (i.e. in + conjunction with the option) or in containers and is equivalent to + poweroff otherwise. This command is asynchronous; it will return after the exit + operation is enqueued, without waiting for it to complete. - This command honors , , - and in a similar way as enable. + The service manager will exit with the specified exit code, if + EXIT_CODE is passed. - reenable UNIT… + switch-root ROOT INIT - Reenable one or more units, as specified on the command line. This is a combination of - disable and enable and is useful to reset the symlinks a unit file is - enabled with to the defaults configured in its [Install] section. This command expects - a unit name only, it does not accept paths to unit files. + Switches to a different root directory and executes a new system manager process below it. This is + intended for usage in initial RAM disks ("initrd"), and will transition from the initrd's system manager + process (a.k.a. "init" process) to the main system manager process which is loaded from the actual host + volume. This call takes two arguments: the directory that is to become the new root directory, and the path + to the new system manager binary below it to execute as PID 1. If the latter is omitted or the empty + string, a systemd binary will automatically be searched for and used as init. If the system manager path is + omitted, equal to the empty string or identical to the path to the systemd binary, the state of the + initrd's system manager process is passed to the main system manager, which allows later introspection of + the state of the services involved in the initrd boot phase. - preset UNIT… + suspend - Reset the enable/disable status one or more unit files, as specified on - the command line, to the defaults configured in the preset policy files. This - has the same effect as disable or - enable, depending how the unit is listed in the preset - files. - - Use to control whether units shall be - enabled and disabled, or only enabled, or only disabled. + Suspend the system. This will trigger activation of the special target unit + suspend.target. This command is asynchronous, and will return after the suspend + operation is successfully enqueued. It will not wait for the suspend/resume cycle to complete. + + - If the unit carries no install information, it will be silently ignored - by this command. UNIT must be the real unit name, - any alias names are ignored silently. + + hibernate - For more information on the preset policy format, see - systemd.preset5. - For more information on the concept of presets, please consult the - Preset - document. + + Hibernate the system. This will trigger activation of the special target unit + hibernate.target. This command is asynchronous, and will return after the hibernation + operation is successfully enqueued. It will not wait for the hibernate/thaw cycle to complete. - preset-all + hybrid-sleep - Resets all installed unit files to the defaults - configured in the preset policy file (see above). - - Use to control - whether units shall be enabled and disabled, or only - enabled, or only disabled. + Hibernate and suspend the system. This will trigger activation of the special target unit + hybrid-sleep.target. This command is asynchronous, and will return after the hybrid + sleep operation is successfully enqueued. It will not wait for the sleep/wake-up cycle to complete. - is-enabled UNIT… + suspend-then-hibernate - Checks whether any of the specified unit files are - enabled (as with enable). Returns an - exit code of 0 if at least one is enabled, non-zero - otherwise. Prints the current enable status (see table). - To suppress this output, use . - To show installation targets, use . - + Suspend the system and hibernate it after the delay specified in systemd-sleep.conf. + This will trigger activation of the special target unit suspend-then-hibernate.target. + This command is asynchronous, and will return after the hybrid sleep operation is successfully enqueued. + It will not wait for the sleep/wake-up or hibernate/thaw cycle to complete. + + + + - - - <command>is-enabled</command> output - + + Parameter Syntax - - - - Name - Description - Exit Code - - - - - enabled - Enabled via .wants/, .requires/ or Alias= symlinks (permanently in /etc/systemd/system/, or transiently in /run/systemd/system/). - 0 - - - enabled-runtime - - - linked - Made available through one or more symlinks to the unit file (permanently in /etc/systemd/system/ or transiently in /run/systemd/system/), even though the unit file might reside outside of the unit file search path. - > 0 - - - linked-runtime - - - masked - Completely disabled, so that any start operation on it fails (permanently in /etc/systemd/system/ or transiently in /run/systemd/systemd/). - > 0 - - - masked-runtime - - - static - The unit file is not enabled, and has no provisions for enabling in the [Install] unit file section. - 0 - - - indirect - The unit file itself is not enabled, but it has a non-empty Also= setting in the [Install] unit file section, listing other unit files that might be enabled, or it has an alias under a different name through a symlink that is not specified in Also=. For template unit file, an instance different than the one specified in DefaultInstance= is enabled. - 0 - - - disabled - The unit file is not enabled, but contains an [Install] section with installation instructions. - > 0 - - - generated - The unit file was generated dynamically via a generator tool. See systemd.generator7. Generated unit files may not be enabled, they are enabled implicitly by their generator. - 0 - - - transient - The unit file has been created dynamically with the runtime API. Transient units may not be enabled. - 0 - - - bad - The unit file is invalid or another error occurred. Note that is-enabled will not actually return this state, but print an error message instead. However the unit file listing printed by list-unit-files might show it. - > 0 - - - -
+ Unit commands listed above take either a single unit name (designated as UNIT), + or multiple unit specifications (designated as PATTERN…). In the first case, the + unit name with or without a suffix must be given. If the suffix is not specified (unit name is "abbreviated"), + systemctl will append a suitable suffix, .service by default, and a type-specific suffix in + case of commands which operate only on specific unit types. For example, + # systemctl start sshd and + # systemctl start sshd.service + are equivalent, as are + # systemctl isolate default + and + # systemctl isolate default.target + Note that (absolute) paths to device nodes are automatically converted to device unit names, and other (absolute) + paths to mount unit names. + # systemctl status /dev/sda +# systemctl status /home + are equivalent to: + # systemctl status dev-sda.device +# systemctl status home.mount + In the second case, shell-style globs will be matched against the primary names of all units currently in memory; + literal unit names, with or without a suffix, will be treated as in the first case. This means that literal unit + names always refer to exactly one unit, but globs may match zero units and this is not considered an + error. - - + Glob patterns use + fnmatch3, + so normal shell-style globbing rules are used, and + *, ?, + [] may be used. See + glob7 + for more details. The patterns are matched against the primary names of + units currently in memory, and patterns which do not match anything + are silently skipped. For example: + # systemctl stop sshd@*.service + will stop all sshd@.service instances. Note that alias names of units, and units that aren't + in memory are not considered for glob expansion. + - - mask UNIT… + For unit file commands, the specified UNIT should be the name of the unit file + (possibly abbreviated, see above), or the absolute path to the unit file: + # systemctl enable foo.service + or + # systemctl link /path/to/foo.service + + - - Mask one or more units, as specified on the command line. This will link these unit files to - /dev/null, making it impossible to start them. This is a stronger version of - disable, since it prohibits all kinds of activation of the unit, including enablement - and manual activation. Use this option with care. This honors the option to only - mask temporarily until the next reboot of the system. The option may be used to - ensure that the units are also stopped. This command expects valid unit names only, it does not accept unit - file paths. - - +
- - unmask UNIT… + + Options - - Unmask one or more unit files, as specified on the command line. This will undo the effect of - mask. This command expects valid unit names only, it does not accept unit file - paths. - - + The following options are understood: - - link PATH… + + + + - - Link a unit file that is not in the unit file search paths into the unit file search path. This - command expects an absolute path to a unit file. The effect of this may be undone with - disable. The effect of this command is that a unit file is made available for commands - such as start, even though it is not installed directly in the unit search path. The - file system where the linked unit files are located must be accessible when systemd is started - (e.g. anything underneath /home or /var is not allowed, unless - those directories are located on the root file system). - - + + The argument should be a comma-separated list of unit + types such as and + . + - - revert UNIT… + If one of the arguments is a unit type, when listing + units, limit display to certain unit types. Otherwise, units + of all types will be shown. - - Revert one or more unit files to their vendor versions. This command removes drop-in configuration - files that modify the specified units, as well as any user-configured unit file that overrides a matching - vendor supplied unit file. Specifically, for a unit foo.service the matching directories - foo.service.d/ with all their contained files are removed, both below the persistent and - runtime configuration directories (i.e. below /etc/systemd/system and - /run/systemd/system); if the unit file has a vendor-supplied version (i.e. a unit file - located below /usr) any matching persistent or runtime unit file that overrides it is - removed, too. Note that if a unit file has no vendor-supplied version (i.e. is only defined below - /etc/systemd/system or /run/systemd/system, but not in a unit - file stored below /usr), then it is not removed. Also, if a unit is masked, it is - unmasked. + As a special case, if one of the arguments is + , a list of allowed values will be + printed and the program will exit. + + - Effectively, this command may be used to undo all changes made with systemctl - edit, systemctl set-property and systemctl mask and puts - the original unit file with its settings back in effect. - - + + - - add-wants TARGET - UNIT… - add-requires TARGET - UNIT… + + The argument should be a comma-separated list of unit + LOAD, SUB, or ACTIVE states. When listing units, show only + those in the specified states. Use + to show only failed units. - - Adds Wants= or Requires= - dependencies, respectively, to the specified - TARGET for one or more units. + As a special case, if one of the arguments is + , a list of allowed values will be + printed and the program will exit. + + - This command honors , - , and - in a way similar to - enable. + + + - - + + When showing unit/job/manager properties with the + show command, limit display to properties + specified in the argument. The argument should be a + comma-separated list of property names, such as + MainPID. Unless specified, all known + properties are shown. If specified more than once, all + properties with the specified names are shown. Shell + completion is implemented for property names. - - edit UNIT… + For the manager itself, + systemctl show will show all available + properties. Those properties are documented in + systemd-system.conf5. + - - Edit a drop-in snippet or a whole replacement file if - is specified, to extend or override the - specified unit. + Properties for units vary by unit type, so showing any + unit (even a non-existent one) is a way to list properties + pertaining to this type. Similarly, showing any job will list + properties pertaining to all jobs. Properties for units are + documented in + systemd.unit5, + and the pages for individual unit types + systemd.service5, + systemd.socket5, + etc. + + - Depending on whether (the default), - , or is specified, - this command creates a drop-in file for each unit either for the system, - for the calling user, or for all futures logins of all users. Then, - the editor (see the "Environment" section below) is invoked on - temporary files which will be written to the real location if the - editor exits successfully. + + + - If is specified, this will copy the - original units instead of creating drop-in files. + + When listing units with list-units, also show inactive units and + units which are following other units. When showing unit/job/manager properties, show all + properties regardless whether they are set or not. - If is specified and any units do - not already exist, new unit files will be opened for editing. + To list all units installed in the file system, use the + list-unit-files command instead. - If is specified, the changes will - be made temporarily in /run and they will be - lost on the next reboot. + When listing units with list-dependencies, recursively show + dependencies of all dependent units (by default only dependencies of target units are + shown). - If the temporary file is empty upon exit, the modification of - the related unit is canceled. + When used with status, show journal messages in full, even if they include + unprintable characters or are very long. By default, fields with unprintable characters are + abbreviated as "blob data". (Note that the pager may escape unprintable characters again.) + + - After the units have been edited, systemd configuration is - reloaded (in a way that is equivalent to daemon-reload). - + + + - Note that this command cannot be used to remotely edit units - and that you cannot temporarily edit units which are in - /etc, since they take precedence over - /run. - - + + When listing units, also show units of local + containers. Units of local containers will be prefixed with + the container name, separated by a single colon character + (:). + + - - get-default + + - - Return the default target to boot into. This returns - the target unit name default.target - is aliased (symlinked) to. - - + + Show reverse dependencies between units with + list-dependencies, i.e. follow + dependencies of type WantedBy=, + RequiredBy=, + PartOf=, BoundBy=, + instead of Wants= and similar. + + + - - set-default TARGET + + - - Set the default target to boot into. This sets - (symlinks) the default.target alias - to the given target unit. - - + + With list-dependencies, show the + units that are ordered before the specified unit. In other + words, recursively list units following the + After= dependency. - - + Note that any After= dependency is + automatically mirrored to create a + Before= dependency. Temporal dependencies + may be specified explicitly, but are also created implicitly + for units which are WantedBy= targets + (see + systemd.target5), + and as a result of other directives (for example + RequiresMountsFor=). Both explicitly + and implicitly introduced dependencies are shown with + list-dependencies. - - Machine Commands + When passed to the list-jobs command, for each printed job show which other jobs are + waiting for it. May be combined with to show both the jobs waiting for each job as + well as all jobs each job is waiting for. + + - - - list-machines PATTERN… + + - - List the host and all running local containers with - their state. If one or more - PATTERNs are specified, only - containers matching one of them are shown. - - - - - + + With list-dependencies, show the + units that are ordered after the specified unit. In other + words, recursively list units following the + Before= dependency. - - Job Commands + When passed to the list-jobs command, for each printed job show which other jobs it + is waiting for. May be combined with to show both the jobs waiting for each job as + well as all jobs each job is waiting for. + + - - - list-jobs PATTERN… + + + - - List jobs that are in progress. If one or more - PATTERNs are specified, only - jobs for units matching one of them are shown. + + Do not ellipsize unit names, process tree entries, + journal output, or truncate unit descriptions in the output + of status, list-units, + list-jobs, and + list-timers. + Also, show installation targets in the output of + is-enabled. + + - When combined with or the list is augmented with - information on which other job each job is waiting for, and which other jobs are waiting for it, see - above. - - - - cancel JOB… + + - - Cancel one or more jobs specified on the command line - by their numeric job IDs. If no job ID is specified, cancel - all pending jobs. - - - - + + When printing properties with show, + only print the value, and skip the property name and + =. + + - - Environment Commands + + - - - show-environment + + When showing sockets, show the type of the socket. + + - - Dump the systemd manager environment block. This is the environment - block that is passed to all processes the manager spawns. The environment - block will be dumped in straight-forward form suitable for sourcing into - most shells. If no special characters or whitespace is present in the variable - values, no escaping is performed, and the assignments have the form - VARIABLE=value. If whitespace or characters which have - special meaning to the shell are present, dollar-single-quote escaping is - used, and assignments have the form VARIABLE=$'value'. - This syntax is known to be supported by - bash1, - zsh1, - ksh1, - and - busybox1's - ash1, - but not - dash1 - or - fish1. - - - - - set-environment VARIABLE=VALUE… + + - - Set one or more systemd manager environment variables, - as specified on the command line. - - - - unset-environment VARIABLE… + + When queuing a new job, this option controls how to deal with + already queued jobs. It takes one of fail, + replace, + replace-irreversibly, + isolate, + ignore-dependencies, + ignore-requirements or + flush. Defaults to + replace, except when the + isolate command is used which implies the + isolate job mode. - - Unset one or more systemd manager environment - variables. If only a variable name is specified, it will be - removed regardless of its value. If a variable and a value - are specified, the variable is only removed if it has the - specified value. - - - - - import-environment - VARIABLE… - + If fail is specified and a requested + operation conflicts with a pending job (more specifically: + causes an already pending start job to be reversed into a stop + job or vice versa), cause the operation to fail. - - Import all, one or more environment variables set on - the client into the systemd manager environment block. If - no arguments are passed, the entire environment block is - imported. Otherwise, a list of one or more environment - variable names should be passed, whose client-side values - are then imported into the manager's environment - block. - - - - + If replace (the default) is + specified, any conflicting pending job will be replaced, as + necessary. - - Manager Lifecycle Commands + If replace-irreversibly is specified, + operate like replace, but also mark the new + jobs as irreversible. This prevents future conflicting + transactions from replacing these jobs (or even being enqueued + while the irreversible jobs are still pending). Irreversible + jobs can still be cancelled using the cancel + command. This job mode should be used on any transaction which + pulls in shutdown.target. - - - daemon-reload + isolate is only valid for start + operations and causes all other units to be stopped when the + specified unit is started. This mode is always used when the + isolate command is used. - - Reload the systemd manager configuration. This will - rerun all generators (see - systemd.generator7), - reload all unit files, and recreate the entire dependency - tree. While the daemon is being reloaded, all sockets - systemd listens on behalf of user configuration will stay - accessible. + flush will cause all queued jobs to + be canceled when the new job is enqueued. - This command should not be confused with the - reload command. - - - - daemon-reexec + If ignore-dependencies is specified, + then all unit dependencies are ignored for this new job and + the operation is executed immediately. If passed, no required + units of the unit passed will be pulled in, and no ordering + dependencies will be honored. This is mostly a debugging and + rescue tool for the administrator and should not be used by + applications. - - Reexecute the systemd manager. This will serialize the - manager state, reexecute the process and deserialize the - state again. This command is of little use except for - debugging and package upgrades. Sometimes, it might be - helpful as a heavy-weight daemon-reload. - While the daemon is being reexecuted, all sockets systemd listening - on behalf of user configuration will stay accessible. - - - - - + ignore-requirements is similar to + ignore-dependencies, but only causes the + requirement dependencies to be ignored, the ordering + dependencies will still be honored. + - - System Commands + - - - is-system-running + + + - - Checks whether the system is operational. This - returns success (exit code 0) when the system is fully up - and running, specifically not in startup, shutdown or - maintenance mode, and with no failed services. Failure is - returned otherwise (exit code non-zero). In addition, the - current state is printed in a short string to standard - output, see the table below. Use to - suppress this output. + + When enqueuing a unit job (for example as effect of a systemctl start + invocation or similar), show brief information about all jobs enqueued, covering both the requested + job and any added because of unit dependencies. Note that the output will only include jobs + immediately part of the transaction requested. It is possible that service start-up program code + run as effect of the enqueued jobs might request further jobs to be pulled in. This means that + completion of the listed jobs might ultimately entail more jobs than the listed ones. + + - Use to wait until the boot - process is completed before printing the current state and - returning the appropriate error status. If - is in use, states initializing or - starting will not be reported, instead - the command will block until a later state (such as - running or degraded) - is reached. + + - - <command>is-system-running</command> output - - - - - - - Name - Description - Exit Code - - - - - initializing - Early bootup, before - basic.target is reached - or the maintenance state entered. - - > 0 - - - starting - Late bootup, before the job queue - becomes idle for the first time, or one of the - rescue targets are reached. - > 0 - - - running - The system is fully - operational. - 0 - - - degraded - The system is operational but one or more - units failed. - > 0 - - - maintenance - The rescue or emergency target is - active. - > 0 - - - stopping - The manager is shutting - down. - > 0 - - - offline - The manager is not - running. Specifically, this is the operational - state if an incompatible program is running as - system manager (PID 1). - > 0 - - - unknown - The operational state could not be - determined, due to lack of resources or another - error cause. - > 0 - - - -
- -
+ + Shorthand for fail. + When used with the kill command, + if no units were killed, the operation results in an error. + + +
- - default + + + - - Enter default mode. This is equivalent to systemctl isolate default.target. This - operation is blocking by default, use to request asynchronous behavior. - - + + When system shutdown or a sleep state is requested, ignore inhibitor locks. Applications can establish + inhibitor locks to avoid that certain important operations (such as CD burning or suchlike) are interrupted + by system shutdown or a sleep state. Any user may take these locks and privileged users may override these + locks. If any locks are taken, shutdown and sleep state requests will normally fail (unless privileged) and a + list of active locks is printed. However, if is specified, the + established locks are ignored and not shown, and the operation attempted anyway, possibly requiring + additional privileges. + + - - rescue + + - - Enter rescue mode. This is equivalent to systemctl isolate rescue.target. This - operation is blocking by default, use to request asynchronous behavior. - - - - emergency + + Just print what would be done. Currently supported by verbs + halt, poweroff, reboot, + kexec, suspend, hibernate, + hybrid-sleep, suspend-then-hibernate, + default, rescue, + emergency, and exit. + + - - Enter emergency mode. This is equivalent to systemctl isolate - emergency.target. This operation is blocking by default, use to - request asynchronous behavior. - - - - halt + + + - - Shut down and halt the system. This is mostly equivalent to systemctl start halt.target - --job-mode=replace-irreversibly --no-block, but also prints a wall message to all users. This command is - asynchronous; it will return after the halt operation is enqueued, without waiting for it to complete. Note - that this operation will simply halt the OS kernel after shutting down, leaving the hardware powered - on. Use systemctl poweroff for powering off the system (see below). + + Suppress printing of the results of various commands + and also the hints about truncated log lines. This does not + suppress output of commands for which the printed output is + the only result (like show). Errors are + always printed. + + - If combined with , shutdown of all running services is skipped, however all - processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the - system halt. If is specified twice, the operation is immediately executed without - terminating any processes or unmounting any file systems. This may result in data loss. Note that when - is specified twice the halt operation is executed by systemctl - itself, and the system manager is not contacted. This means the command should succeed even when the system - manager has crashed. - - - - poweroff + + - - Shut down and power-off the system. This is mostly equivalent to systemctl start - poweroff.target --job-mode=replace-irreversibly --no-block, but also prints a wall message to all - users. This command is asynchronous; it will return after the power-off operation is enqueued, without - waiting for it to complete. + + Do not synchronously wait for the requested operation + to finish. If this is not specified, the job will be + verified, enqueued and systemctl will + wait until the unit's start-up is completed. By passing this + argument, it is only verified and enqueued. This option may not be + combined with . + + - If combined with , shutdown of all running services is skipped, however all - processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the - powering off. If is specified twice, the operation is immediately executed without - terminating any processes or unmounting any file systems. This may result in data loss. Note that when - is specified twice the power-off operation is executed by - systemctl itself, and the system manager is not contacted. This means the command should - succeed even when the system manager has crashed. - - - - reboot arg + + + + + Synchronously wait for started units to terminate again. + This option may not be combined with . + Note that this will wait forever if any given unit never terminates + (by itself or by getting stopped explicitly); particularly services + which use RemainAfterExit=yes. + + When used with is-system-running, wait + until the boot process is completed before returning. + + + + + + + + + + + List units in failed state. This is equivalent to + . + + + + + + + + Do not send wall message before halt, power-off and reboot. + + + + + + + + When used with enable and + disable, operate on the global user + configuration directory, thus enabling or disabling a unit + file globally for all future logins of all users. + + + + + + + + When used with enable and + disable, do not implicitly reload daemon + configuration after executing the changes. + + + + + + + + When used with start and related + commands, disables asking for passwords. Background services + may require input of a password or passphrase string, for + example to unlock system hard disks or cryptographic + certificates. Unless this option is specified and the + command is invoked from a terminal, + systemctl will query the user on the + terminal for the necessary secrets. Use this option to + switch this behavior off. In this case, the password must be + supplied by some other means (for example graphical password + agents) or the service might fail. This also disables + querying the user for authentication for privileged + operations. + + + + + + + + When used with kill, choose which + processes to send a signal to. Must be one of + , or + to select whether to kill only the main + process, the control process or all processes of the + unit. The main process of the unit is the one that defines + the life-time of it. A control process of a unit is one that + is invoked by the manager to induce state changes of it. For + example, all processes started due to the + ExecStartPre=, + ExecStop= or + ExecReload= settings of service units are + control processes. Note that there is only one control + process per unit at a time, as only one state change is + executed at a time. For services of type + Type=forking, the initial process started + by the manager for ExecStart= is a + control process, while the process ultimately forked off by + that one is then considered the main process of the unit (if + it can be determined). This is different for service units + of other types, where the process forked off by the manager + for ExecStart= is always the main process + itself. A service unit consists of zero or one main process, + zero or one control process plus any number of additional + processes. Not all unit types manage processes of these + types however. For example, for mount units, control processes + are defined (which are the invocations of + &MOUNT_PATH; and + &UMOUNT_PATH;), but no main process + is defined. If omitted, defaults to + . + + + + + + + + + + When used with kill, choose which + signal to send to selected processes. Must be one of the + well-known signal specifiers such as SIGTERM, SIGINT or + SIGSTOP. If omitted, defaults to + . + + + + + + + + Select what type of per-unit resources to remove when the clean command is + invoked, see below. Takes one of configuration, state, + cache, logs, runtime to select the + type of resource. This option may be specified more than once, in which case all specified resource + types are removed. Also accepts the special value all as a shortcut for + specifiying all five resource types. If this option is not specified defaults to the combination of + cache and runtime, i.e. the two kinds of resources that + are generally considered to be redundant and can be reconstructed on next invocation. + + + + + + + + + When used with enable, overwrite + any existing conflicting symlinks. + + When used with edit, create all of the + specified units which do not already exist. + + When used with halt, poweroff, reboot or + kexec, execute the selected operation without shutting down all units. However, all + processes will be killed forcibly and all file systems are unmounted or remounted read-only. This is hence a + drastic but relatively safe option to request an immediate reboot. If is specified + twice for these operations (with the exception of kexec), they will be executed + immediately, without terminating any processes or unmounting any file systems. Warning: specifying + twice with any of these operations might result in data loss. Note that when + is specified twice the selected operation is executed by + systemctl itself, and the system manager is not contacted. This means the command should + succeed even when the system manager has crashed. + + - - Shut down and reboot the system. This is mostly equivalent to systemctl start reboot.target - --job-mode=replace-irreversibly --no-block, but also prints a wall message to all users. This - command is asynchronous; it will return after the reboot operation is enqueued, without waiting for it to - complete. + + - If combined with , shutdown of all running services is skipped, however all - processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the - reboot. If is specified twice, the operation is immediately executed without - terminating any processes or unmounting any file systems. This may result in data loss. Note that when - is specified twice the reboot operation is executed by - systemctl itself, and the system manager is not contacted. This means the command should - succeed even when the system manager has crashed. + + When used with halt, poweroff or reboot, set a + short message explaining the reason for the operation. The message will be logged together with the default + shutdown message. + + - If the optional argument arg is given, it will be passed as the optional - argument to the reboot2 - system call. The value is architecture and firmware specific. As an example, recovery - might be used to trigger system recovery, and fota might be used to trigger a - firmware over the air update. - - + + - - kexec + + When used with enable, the units + will also be started. When used with disable or + mask, the units will also be stopped. The start + or stop operation is only carried out when the respective enable or + disable operation has been successful. + + - - Shut down and reboot the system via kexec. This is equivalent to - systemctl start kexec.target --job-mode=replace-irreversibly --no-block. This command is - asynchronous; it will return after the reboot operation is enqueued, without waiting for it to - complete. + + - If combined with , shutdown of all running services is skipped, however all - processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the - reboot. - - + + When used with + enable/disable/is-enabled + (and related commands), use the specified root path when looking for unit + files. If this option is present, systemctl will operate on + the file system directly, instead of communicating with the systemd + daemon to carry out changes. + - - exit EXIT_CODE + - - Ask the service manager to quit. This is only supported for user service managers (i.e. in - conjunction with the option) or in containers and is equivalent to - poweroff otherwise. This command is asynchronous; it will return after the exit - operation is enqueued, without waiting for it to complete. + + - The service manager will exit with the specified exit code, if - EXIT_CODE is passed. - - + + When used with enable, + disable, edit, + (and related commands), make changes only temporarily, so + that they are lost on the next reboot. This will have the + effect that changes are not made in subdirectories of + /etc but in /run, + with identical immediate effects, however, since the latter + is lost on reboot, the changes are lost too. - - switch-root ROOT INIT + Similarly, when used with + set-property, make changes only + temporarily, so that they are lost on the next + reboot. + + - - Switches to a different root directory and executes a new system manager process below it. This is - intended for usage in initial RAM disks ("initrd"), and will transition from the initrd's system manager - process (a.k.a. "init" process) to the main system manager process which is loaded from the actual host - volume. This call takes two arguments: the directory that is to become the new root directory, and the path - to the new system manager binary below it to execute as PID 1. If the latter is omitted or the empty - string, a systemd binary will automatically be searched for and used as init. If the system manager path is - omitted, equal to the empty string or identical to the path to the systemd binary, the state of the - initrd's system manager process is passed to the main system manager, which allows later introspection of - the state of the services involved in the initrd boot phase. - - + + - - suspend + + Takes one of full (the default), + enable-only, + disable-only. When used with the + preset or preset-all + commands, controls whether units shall be disabled and + enabled according to the preset rules, or only enabled, or + only disabled. + + - - Suspend the system. This will trigger activation of the special target unit - suspend.target. This command is asynchronous, and will return after the suspend - operation is successfully enqueued. It will not wait for the suspend/resume cycle to complete. - - + + + - - hibernate + + When used with status, controls the number of journal lines to show, counting from + the most recent ones. Takes a positive integer argument, or 0 to disable journal output. Defaults to + 10. + + - - Hibernate the system. This will trigger activation of the special target unit - hibernate.target. This command is asynchronous, and will return after the hibernation - operation is successfully enqueued. It will not wait for the hibernate/thaw cycle to complete. - - + + + - - hybrid-sleep + + When used with status, controls the + formatting of the journal entries that are shown. For the + available choices, see + journalctl1. + Defaults to short. + + - - Hibernate and suspend the system. This will trigger activation of the special target unit - hybrid-sleep.target. This command is asynchronous, and will return after the hybrid - sleep operation is successfully enqueued. It will not wait for the sleep/wake-up cycle to complete. - - + + - - suspend-then-hibernate + + When used with the reboot command, indicate to the system's firmware to reboot into + the firmware setup interface. Note that this functionality is not available on all systems. + + - - Suspend the system and hibernate it after the delay specified in systemd-sleep.conf. - This will trigger activation of the special target unit suspend-then-hibernate.target. - This command is asynchronous, and will return after the hybrid sleep operation is successfully enqueued. - It will not wait for the sleep/wake-up or hibernate/thaw cycle to complete. - - -
-
+ + - - Parameter Syntax + + When used with the reboot command, indicate to the system's boot loader to show the + boot loader menu on the following boot. Takes a time value as parameter — indicating the menu time-out. Pass + zero in order to disable the menu time-out. Note that not all boot loaders support this + functionality. + + - Unit commands listed above take either a single unit name (designated as UNIT), - or multiple unit specifications (designated as PATTERN…). In the first case, the - unit name with or without a suffix must be given. If the suffix is not specified (unit name is "abbreviated"), - systemctl will append a suitable suffix, .service by default, and a type-specific suffix in - case of commands which operate only on specific unit types. For example, - # systemctl start sshd and - # systemctl start sshd.service - are equivalent, as are - # systemctl isolate default - and - # systemctl isolate default.target - Note that (absolute) paths to device nodes are automatically converted to device unit names, and other (absolute) - paths to mount unit names. - # systemctl status /dev/sda -# systemctl status /home - are equivalent to: - # systemctl status dev-sda.device -# systemctl status home.mount - In the second case, shell-style globs will be matched against the primary names of all units currently in memory; - literal unit names, with or without a suffix, will be treated as in the first case. This means that literal unit - names always refer to exactly one unit, but globs may match zero units and this is not considered an - error. + + - Glob patterns use - fnmatch3, - so normal shell-style globbing rules are used, and - *, ?, - [] may be used. See - glob7 - for more details. The patterns are matched against the primary names of - units currently in memory, and patterns which do not match anything - are silently skipped. For example: - # systemctl stop sshd@*.service - will stop all sshd@.service instances. Note that alias names of units, and units that aren't - in memory are not considered for glob expansion. - + + When used with the reboot command, indicate to the system's boot loader to boot into + a specific boot loader entry on the following boot. Takes a boot loader entry identifier as argument, or + help in order to list available entries. Note that not all boot loaders support this + functionality. + + - For unit file commands, the specified UNIT should be the name of the unit file - (possibly abbreviated, see above), or the absolute path to the unit file: - # systemctl enable foo.service - or - # systemctl link /path/to/foo.service - - + + + + When used with list-dependencies, + list-units or list-machines, + the output is printed as a list instead of a tree, and the bullet + circles are omitted. + + + + + + + + + + + diff --git a/man/timedatectl.xml b/man/timedatectl.xml index f797e0cd67c..a8c1f5c0f31 100644 --- a/man/timedatectl.xml +++ b/man/timedatectl.xml @@ -47,76 +47,6 @@ - - Options - - The following options are understood: - - - - - - Do not query the user for authentication for - privileged operations. - - - - - - If set-local-rtc is invoked - and this option is passed, the system clock is synchronized - from the RTC again, taking the new setting into account. - Otherwise, the RTC is synchronized from the system - clock. - - - - - - If timesync-status is invoked and this option is passed, then - timedatectl monitors the status of - systemd-timesyncd.service8 - and updates the outputs. Use CtrlC to terminate the - monitoring. - - - - - - - When showing properties of - systemd-timesyncd.service8, - show all properties regardless of whether they are set or not. - - - - - - - When showing properties of - systemd-timesyncd.service8, - limit display to certain properties as specified as argument. If not specified, all set properties are shown. - The argument should be a property name, such as ServerName. If specified more than once, - all properties with the specified names are shown. - - - - - - - When printing properties with show-timesync, only print the value, and skip the - property name and =. - - - - - - - - - - - Commands @@ -247,6 +177,76 @@ + + Options + + The following options are understood: + + + + + + Do not query the user for authentication for + privileged operations. + + + + + + If set-local-rtc is invoked + and this option is passed, the system clock is synchronized + from the RTC again, taking the new setting into account. + Otherwise, the RTC is synchronized from the system + clock. + + + + + + If timesync-status is invoked and this option is passed, then + timedatectl monitors the status of + systemd-timesyncd.service8 + and updates the outputs. Use CtrlC to terminate the + monitoring. + + + + + + + When showing properties of + systemd-timesyncd.service8, + show all properties regardless of whether they are set or not. + + + + + + + When showing properties of + systemd-timesyncd.service8, + limit display to certain properties as specified as argument. If not specified, all set properties are shown. + The argument should be a property name, such as ServerName. If specified more than once, + all properties with the specified names are shown. + + + + + + + When printing properties with show-timesync, only print the value, and skip the + property name and =. + + + + + + + + + + + Exit status diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index 2c8163360fa..dcf5687a431 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -1038,15 +1038,7 @@ static int help(int argc, char *argv[], void *userdata) { return log_oom(); printf("%s [COMMAND] [OPTIONS...]\n\n" - "Install, update or remove the systemd-boot EFI boot manager.\n\n" - " -h --help Show this help\n" - " --version Print version\n" - " --esp-path=PATH Path to the EFI System Partition (ESP)\n" - " --boot-path=PATH Path to the $BOOT partition\n" - " -p --print-esp-path Print path to the EFI System Partition\n" - " -x --print-boot-path Print path to the $BOOT partition\n" - " --no-variables Don't touch EFI variables\n" - " --no-pager Do not pipe output into a pager\n" + "Install, update or remove the systemd-boot EFI boot manager.\n" "\nBoot Loader Commands:\n" " status Show status of installed systemd-boot and EFI variables\n" " install Install systemd-boot to the ESP and EFI variables\n" @@ -1059,6 +1051,14 @@ static int help(int argc, char *argv[], void *userdata) { " list List boot loader entries\n" " set-default ID Set default boot loader entry\n" " set-oneshot ID Set default boot loader entry, for next boot only\n" + " -h --help Show this help\n" + " --version Print version\n" + " --esp-path=PATH Path to the EFI System Partition (ESP)\n" + " --boot-path=PATH Path to the $BOOT partition\n" + " -p --print-esp-path Print path to the EFI System Partition\n" + " -x --print-boot-path Print path to the $BOOT partition\n" + " --no-variables Don't touch EFI variables\n" + " --no-pager Do not pipe output into a pager\n" "\nSee the %s for details.\n" , program_invocation_short_name , link); diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c index 3e2a9286125..e1055ff220b 100644 --- a/src/busctl/busctl.c +++ b/src/busctl/busctl.c @@ -2232,6 +2232,23 @@ static int help(void) { printf("%s [OPTIONS...] {COMMAND} ...\n\n" "Introspect the bus.\n\n" + "Commands:\n" + " list List bus names\n" + " status [SERVICE] Show bus service, process or bus owner credentials\n" + " monitor [SERVICE...] Show bus traffic\n" + " capture [SERVICE...] Capture bus traffic as pcap\n" + " tree [SERVICE...] Show object tree of service\n" + " introspect SERVICE OBJECT [INTERFACE]\n" + " call SERVICE OBJECT INTERFACE METHOD [SIGNATURE [ARGUMENT...]]\n" + " Call a method\n" + " emit OBJECT INTERFACE SIGNAL [SIGNATURE [ARGUMENT...]]\n" + " Emit a signal\n" + " get-property SERVICE OBJECT INTERFACE PROPERTY...\n" + " Get property value\n" + " set-property SERVICE OBJECT INTERFACE PROPERTY SIGNATURE ARGUMENT...\n" + " Set property value\n" + " help Show this help\n" + "\nOptions:\n" " -h --help Show this help\n" " --version Show package version\n" " --no-pager Do not pipe output into a pager\n" @@ -2261,22 +2278,6 @@ static int help(void) { " --watch-bind=BOOL Wait for bus AF_UNIX socket to be bound in the file\n" " system\n" " --destination=SERVICE Destination service of a signal\n" - "\nCommands:\n" - " list List bus names\n" - " status [SERVICE] Show bus service, process or bus owner credentials\n" - " monitor [SERVICE...] Show bus traffic\n" - " capture [SERVICE...] Capture bus traffic as pcap\n" - " tree [SERVICE...] Show object tree of service\n" - " introspect SERVICE OBJECT [INTERFACE]\n" - " call SERVICE OBJECT INTERFACE METHOD [SIGNATURE [ARGUMENT...]]\n" - " Call a method\n" - " emit OBJECT INTERFACE SIGNAL [SIGNATURE [ARGUMENT...]]\n" - " Emit a signal\n" - " get-property SERVICE OBJECT INTERFACE PROPERTY...\n" - " Get property value\n" - " set-property SERVICE OBJECT INTERFACE PROPERTY SIGNATURE ARGUMENT...\n" - " Set property value\n" - " help Show this help\n" "\nSee the %s for details.\n" , program_invocation_short_name , link diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c index 292c1861dc5..6ce0c297d85 100644 --- a/src/coredump/coredumpctl.c +++ b/src/coredump/coredumpctl.c @@ -147,8 +147,13 @@ static int help(void) { return log_oom(); printf("%s [OPTIONS...]\n\n" - "List or retrieve coredumps from the journal.\n\n" - "Flags:\n" + "List or retrieve coredumps from the journal.\n" + "\nCommands:\n" + " list [MATCHES...] List available coredumps (default)\n" + " info [MATCHES...] Show detailed information about one or more coredumps\n" + " dump [MATCHES...] Print first matching coredump to stdout\n" + " debug [MATCHES...] Start a debugger for the first matching coredump\n" + "\nFlags:\n" " -h --help Show this help\n" " --version Print version string\n" " --no-pager Do not pipe output into a pager\n" @@ -162,11 +167,6 @@ static int help(void) { " -o --output=FILE Write output to FILE\n" " -D --directory=DIR Use journal files from directory\n\n" " -q --quiet Do not show info messages and privilege warning\n" - "Commands:\n" - " list [MATCHES...] List available coredumps (default)\n" - " info [MATCHES...] Show detailed information about one or more coredumps\n" - " dump [MATCHES...] Print first matching coredump to stdout\n" - " debug [MATCHES...] Start a debugger for the first matching coredump\n" "\nSee the %s for details.\n" , program_invocation_short_name , link diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c index 22de7350fe7..1dfc0e68e6d 100644 --- a/src/hostname/hostnamectl.c +++ b/src/hostname/hostnamectl.c @@ -310,7 +310,15 @@ static int help(void) { return log_oom(); printf("%s [OPTIONS...] COMMAND ...\n\n" - "Query or change system hostname.\n\n" + "Query or change system hostname.\n" + "\nCommands:\n" + " status Show current hostname settings\n" + " set-hostname NAME Set system hostname\n" + " set-icon-name NAME Set icon name for host\n" + " set-chassis NAME Set chassis type for host\n" + " set-deployment NAME Set deployment environment for host\n" + " set-location NAME Set location for host\n" + "\nOptions:\n" " -h --help Show this help\n" " --version Show package version\n" " --no-ask-password Do not prompt for password\n" @@ -318,14 +326,7 @@ static int help(void) { " -M --machine=CONTAINER Operate on local container\n" " --transient Only set transient hostname\n" " --static Only set static hostname\n" - " --pretty Only set pretty hostname\n\n" - "Commands:\n" - " status Show current hostname settings\n" - " set-hostname NAME Set system hostname\n" - " set-icon-name NAME Set icon name for host\n" - " set-chassis NAME Set chassis type for host\n" - " set-deployment NAME Set deployment environment for host\n" - " set-location NAME Set location for host\n" + " --pretty Only set pretty hostname\n" "\nSee the %s for details.\n" , program_invocation_short_name , link diff --git a/src/login/loginctl.c b/src/login/loginctl.c index 2ad9887066f..4d11e686362 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -1281,27 +1281,8 @@ static int help(int argc, char *argv[], void *userdata) { return log_oom(); printf("%s [OPTIONS...] {COMMAND} ...\n\n" - "Send control commands to or query the login manager.\n\n" - " -h --help Show this help\n" - " --version Show package version\n" - " --no-pager Do not pipe output into a pager\n" - " --no-legend Do not show the headers and footers\n" - " --no-ask-password Don't prompt for password\n" - " -H --host=[USER@]HOST Operate on remote host\n" - " -M --machine=CONTAINER Operate on local container\n" - " -p --property=NAME Show only properties by this name\n" - " -a --all Show all properties, including empty ones\n" - " --value When showing properties, only print the value\n" - " -l --full Do not ellipsize output\n" - " --kill-who=WHO Who to send signal to\n" - " -s --signal=SIGNAL Which signal to send\n" - " -n --lines=INTEGER Number of journal entries to show\n" - " -o --output=STRING Change journal output mode (short, short-precise,\n" - " short-iso, short-iso-precise, short-full,\n" - " short-monotonic, short-unix, verbose, export,\n" - " json, json-pretty, json-sse, json-seq, cat,\n" - " with-unit)\n" - "Session Commands:\n" + "Send control commands to or query the login manager.\n" + "\nSession Commands:\n" " list-sessions List sessions\n" " session-status [ID...] Show session status\n" " show-session [ID...] Show properties of sessions or the manager\n" @@ -1327,6 +1308,26 @@ static int help(int argc, char *argv[], void *userdata) { " attach NAME DEVICE... Attach one or more devices to a seat\n" " flush-devices Flush all device associations\n" " terminate-seat NAME... Terminate all sessions on one or more seats\n" + "\nOptions\n" + " -h --help Show this help\n" + " --version Show package version\n" + " --no-pager Do not pipe output into a pager\n" + " --no-legend Do not show the headers and footers\n" + " --no-ask-password Don't prompt for password\n" + " -H --host=[USER@]HOST Operate on remote host\n" + " -M --machine=CONTAINER Operate on local container\n" + " -p --property=NAME Show only properties by this name\n" + " -a --all Show all properties, including empty ones\n" + " --value When showing properties, only print the value\n" + " -l --full Do not ellipsize output\n" + " --kill-who=WHO Who to send signal to\n" + " -s --signal=SIGNAL Which signal to send\n" + " -n --lines=INTEGER Number of journal entries to show\n" + " -o --output=STRING Change journal output mode (short, short-precise,\n" + " short-iso, short-iso-precise, short-full,\n" + " short-monotonic, short-unix, verbose, export,\n" + " json, json-pretty, json-sse, json-seq, cat,\n" + " with-unit)\n" "\nSee the %s for details.\n" , program_invocation_short_name , link diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index dcfda07ce3a..c4fb11122b3 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -2692,36 +2692,8 @@ static int help(int argc, char *argv[], void *userdata) { printf("%s [OPTIONS...] {COMMAND} ...\n\n" "Send control commands to or query the virtual machine and container\n" - "registration manager.\n\n" - " -h --help Show this help\n" - " --version Show package version\n" - " --no-pager Do not pipe output into a pager\n" - " --no-legend Do not show the headers and footers\n" - " --no-ask-password Do not ask for system passwords\n" - " -H --host=[USER@]HOST Operate on remote host\n" - " -M --machine=CONTAINER Operate on local container\n" - " -p --property=NAME Show only properties by this name\n" - " -q --quiet Suppress output\n" - " -a --all Show all properties, including empty ones\n" - " --value When showing properties, only print the value\n" - " -l --full Do not ellipsize output\n" - " --kill-who=WHO Who to send signal to\n" - " -s --signal=SIGNAL Which signal to send\n" - " --uid=USER Specify user ID to invoke shell as\n" - " -E --setenv=VAR=VALUE Add an environment variable for shell\n" - " --read-only Create read-only bind mount\n" - " --mkdir Create directory before bind mounting, if missing\n" - " -n --lines=INTEGER Number of journal entries to show\n" - " --max-addresses=INTEGER Number of internet addresses to show at most\n" - " -o --output=STRING Change journal output mode (short, short-precise,\n" - " short-iso, short-iso-precise, short-full,\n" - " short-monotonic, short-unix, verbose, export,\n" - " json, json-pretty, json-sse, json-seq, cat,\n" - " with-unit)\n" - " --verify=MODE Verification mode for downloaded images (no,\n" - " checksum, signature)\n" - " --force Download image even if already exists\n\n" - "Machine Commands:\n" + "registration manager.\n" + "\nMachine Commands:\n" " list List running VMs and containers\n" " status NAME... Show VM/container details\n" " show [NAME...] Show properties of one or more VMs/containers\n" @@ -2760,6 +2732,35 @@ static int help(int argc, char *argv[], void *userdata) { " export-raw NAME [FILE] Export a RAW container or VM image locally\n" " list-transfers Show list of downloads in progress\n" " cancel-transfer Cancel a download\n" + "\nOptions\n" + " -h --help Show this help\n" + " --version Show package version\n" + " --no-pager Do not pipe output into a pager\n" + " --no-legend Do not show the headers and footers\n" + " --no-ask-password Do not ask for system passwords\n" + " -H --host=[USER@]HOST Operate on remote host\n" + " -M --machine=CONTAINER Operate on local container\n" + " -p --property=NAME Show only properties by this name\n" + " -q --quiet Suppress output\n" + " -a --all Show all properties, including empty ones\n" + " --value When showing properties, only print the value\n" + " -l --full Do not ellipsize output\n" + " --kill-who=WHO Who to send signal to\n" + " -s --signal=SIGNAL Which signal to send\n" + " --uid=USER Specify user ID to invoke shell as\n" + " -E --setenv=VAR=VALUE Add an environment variable for shell\n" + " --read-only Create read-only bind mount\n" + " --mkdir Create directory before bind mounting, if missing\n" + " -n --lines=INTEGER Number of journal entries to show\n" + " --max-addresses=INTEGER Number of internet addresses to show at most\n" + " -o --output=STRING Change journal output mode (short, short-precise,\n" + " short-iso, short-iso-precise, short-full,\n" + " short-monotonic, short-unix, verbose, export,\n" + " json, json-pretty, json-sse, json-seq, cat,\n" + " with-unit)\n" + " --verify=MODE Verification mode for downloaded images (no,\n" + " checksum, signature)\n" + " --force Download image even if already exists\n" "\nSee the %s for details.\n" , program_invocation_short_name , link diff --git a/src/network/networkctl.c b/src/network/networkctl.c index d087e43eb3d..5efaf47b7f6 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -1750,13 +1750,7 @@ static int help(void) { return log_oom(); printf("%s [OPTIONS...]\n\n" - "Query and control the networking subsystem.\n\n" - " -h --help Show this help\n" - " --version Show package version\n" - " --no-pager Do not pipe output into a pager\n" - " --no-legend Do not show the headers and footers\n" - " -a --all Show status for all links\n" - " -s --stats Show detailed link statics\n" + "Query and control the networking subsystem.\n" "\nCommands:\n" " list [PATTERN...] List links\n" " status [PATTERN...] Show link status\n" @@ -1764,6 +1758,13 @@ static int help(void) { " label Show current address label entries in the kernel\n" " delete DEVICES.. Delete virtual netdevs\n" " renew DEVICES.. Renew dynamic configurations\n" + "\nOptions\n" + " -h --help Show this help\n" + " --version Show package version\n" + " --no-pager Do not pipe output into a pager\n" + " --no-legend Do not show the headers and footers\n" + " -a --all Show status for all links\n" + " -s --stats Show detailed link statics\n" "\nSee the %s for details.\n" , program_invocation_short_name , link diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c index 5041745b3d0..9e160c10f32 100644 --- a/src/portable/portablectl.c +++ b/src/portable/portablectl.c @@ -782,7 +782,19 @@ static int help(int argc, char *argv[], void *userdata) { return log_oom(); printf("%s [OPTIONS...] {COMMAND} ...\n\n" - "Attach or detach portable services from the local system.\n\n" + "Attach or detach portable services from the local system.\n" + "Commands:\n" + " list List available portable service images\n" + " attach NAME|PATH [PREFIX...]\n" + " Attach the specified portable service image\n" + " detach NAME|PATH Detach the specified portable service image\n" + " inspect NAME|PATH [PREFIX...]\n" + " Show details of specified portable service image\n" + " is-attached NAME|PATH Query if portable service image is attached\n" + " read-only NAME|PATH [BOOL] Mark or unmark portable service image read-only\n" + " remove NAME|PATH... Remove a portable service image\n" + " set-limit [NAME|PATH] Set image or pool size limit (disk quota)\n" + "\nOptions\n" " -h --help Show this help\n" " --version Show package version\n" " --no-pager Do not pipe output into a pager\n" @@ -796,18 +808,7 @@ static int help(int argc, char *argv[], void *userdata) { " --runtime Attach portable service until next reboot only\n" " --no-reload Don't reload the system and service manager\n" " --cat When inspecting include unit and os-release file\n" - " contents\n\n" - "Commands:\n" - " list List available portable service images\n" - " attach NAME|PATH [PREFIX...]\n" - " Attach the specified portable service image\n" - " detach NAME|PATH Detach the specified portable service image\n" - " inspect NAME|PATH [PREFIX...]\n" - " Show details of specified portable service image\n" - " is-attached NAME|PATH Query if portable service image is attached\n" - " read-only NAME|PATH [BOOL] Mark or unmark portable service image read-only\n" - " remove NAME|PATH... Remove a portable service image\n" - " set-limit [NAME|PATH] Set image or pool size limit (disk quota)\n" + " contents\n" "\nSee the %s for details.\n" , program_invocation_short_name , link diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c index 8d2ae892813..59f312d55a1 100644 --- a/src/resolve/resolvectl.c +++ b/src/resolve/resolvectl.c @@ -2527,25 +2527,7 @@ static int native_help(void) { "\n" "Send control commands to the network name resolution manager, or\n" "resolve domain names, IPv4 and IPv6 addresses, DNS records, and services.\n" - "\n" - " -h --help Show this help\n" - " --version Show package version\n" - " --no-pager Do not pipe output into a pager\n" - " -4 Resolve IPv4 addresses\n" - " -6 Resolve IPv6 addresses\n" - " -i --interface=INTERFACE Look on interface\n" - " -p --protocol=PROTO|help Look via protocol\n" - " -t --type=TYPE|help Query RR with DNS type\n" - " -c --class=CLASS|help Query RR with DNS class\n" - " --service-address=BOOL Resolve address for services (default: yes)\n" - " --service-txt=BOOL Resolve TXT records for services (default: yes)\n" - " --cname=BOOL Follow CNAME redirects (default: yes)\n" - " --search=BOOL Use search domains for single-label names\n" - " (default: yes)\n" - " --raw[=payload|packet] Dump the answer as binary data\n" - " --legend=BOOL Print headers and additional info (default: yes)\n" - "\n" - "Commands:\n" + "\nCommands:\n" " query HOSTNAME|ADDRESS... Resolve domain names, IPv4 and IPv6 addresses\n" " service [[NAME] TYPE] DOMAIN Resolve service (SRV)\n" " openpgp EMAIL@DOMAIN... Query OpenPGP public key\n" @@ -2564,6 +2546,23 @@ static int native_help(void) { " dnssec [LINK [MODE]] Get/set per-interface DNSSEC mode\n" " nta [LINK [DOMAIN...]] Get/set per-interface DNSSEC NTA\n" " revert LINK Revert per-interface configuration\n" + "\nOptions\n" + " -h --help Show this help\n" + " --version Show package version\n" + " --no-pager Do not pipe output into a pager\n" + " -4 Resolve IPv4 addresses\n" + " -6 Resolve IPv6 addresses\n" + " -i --interface=INTERFACE Look on interface\n" + " -p --protocol=PROTO|help Look via protocol\n" + " -t --type=TYPE|help Query RR with DNS type\n" + " -c --class=CLASS|help Query RR with DNS class\n" + " --service-address=BOOL Resolve address for services (default: yes)\n" + " --service-txt=BOOL Resolve TXT records for services (default: yes)\n" + " --cname=BOOL Follow CNAME redirects (default: yes)\n" + " --search=BOOL Use search domains for single-label names\n" + " (default: yes)\n" + " --raw[=payload|packet] Dump the answer as binary data\n" + " --legend=BOOL Print headers and additional info (default: yes)\n" "\nSee the %2$s for details.\n" , program_invocation_short_name , link diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index e3d1385f4f1..a2feb645b3b 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -7653,66 +7653,6 @@ static int systemctl_help(void) { printf("%1$s [OPTIONS...] {COMMAND} ...\n\n" "Query or send control commands to the systemd manager.\n\n" - " -h --help Show this help\n" - " --version Show package version\n" - " --system Connect to system manager\n" - " --user Connect to user service manager\n" - " -H --host=[USER@]HOST\n" - " Operate on remote host\n" - " -M --machine=CONTAINER\n" - " Operate on local container\n" - " -t --type=TYPE List units of a particular type\n" - " --state=STATE List units with particular LOAD or SUB or ACTIVE state\n" - " --failed Shorcut for --state=failed\n" - " -p --property=NAME Show only properties by this name\n" - " -a --all Show all properties/all units currently in memory,\n" - " including dead/empty ones. To list all units installed on\n" - " the system, use the 'list-unit-files' command instead.\n" - " -l --full Don't ellipsize unit names on output\n" - " -r --recursive Show unit list of host and local containers\n" - " --reverse Show reverse dependencies with 'list-dependencies'\n" - " --job-mode=MODE Specify how to deal with already queued jobs, when\n" - " queueing a new job\n" - " -T --show-transaction\n" - " When enqueuing a unit job, show full transaction\n" - " --show-types When showing sockets, explicitly show their type\n" - " --value When showing properties, only print the value\n" - " -i --ignore-inhibitors\n" - " When shutting down or sleeping, ignore inhibitors\n" - " --kill-who=WHO Who to send signal to\n" - " -s --signal=SIGNAL Which signal to send\n" - " --what=RESOURCES Which types of resources to remove\n" - " --now Start or stop unit in addition to enabling or disabling it\n" - " --dry-run Only print what would be done\n" - " -q --quiet Suppress output\n" - " --wait For (re)start, wait until service stopped again\n" - " For is-system-running, wait until startup is completed\n" - " --no-block Do not wait until operation finished\n" - " --no-wall Don't send wall message before halt/power-off/reboot\n" - " --no-reload Don't reload daemon after en-/dis-abling unit files\n" - " --no-legend Do not print a legend (column headers and hints)\n" - " --no-pager Do not pipe output into a pager\n" - " --no-ask-password\n" - " Do not ask for system passwords\n" - " --global Enable/disable/mask unit files globally\n" - " --runtime Enable/disable/mask unit files temporarily until next\n" - " reboot\n" - " -f --force When enabling unit files, override existing symlinks\n" - " When shutting down, execute action immediately\n" - " --preset-mode= Apply only enable, only disable, or all presets\n" - " --root=PATH Enable/disable/mask unit files in the specified root\n" - " directory\n" - " -n --lines=INTEGER Number of journal entries to show\n" - " -o --output=STRING Change journal output mode (short, short-precise,\n" - " short-iso, short-iso-precise, short-full,\n" - " short-monotonic, short-unix,\n" - " verbose, export, json, json-pretty, json-sse, cat)\n" - " --firmware-setup Tell the firmware to show the setup menu on next boot\n" - " --boot-loader-menu=TIME\n" - " Boot into boot loader menu on next boot\n" - " --boot-loader-entry=NAME\n" - " Boot into a specific boot loader entry on next boot\n" - " --plain Print unit dependencies as a list instead of a tree\n\n" "%3$sUnit Commands:%4$s\n" " list-units [PATTERN...] List units currently in memory\n" " list-sockets [PATTERN...] List socket units currently in memory,\n" @@ -7797,6 +7737,67 @@ static int systemctl_help(void) { " hybrid-sleep Hibernate and suspend the system\n" " suspend-then-hibernate Suspend the system, wake after a period of\n" " time and put it into hibernate\n" + "\nOptions\n" + " -h --help Show this help\n" + " --version Show package version\n" + " --system Connect to system manager\n" + " --user Connect to user service manager\n" + " -H --host=[USER@]HOST\n" + " Operate on remote host\n" + " -M --machine=CONTAINER\n" + " Operate on local container\n" + " -t --type=TYPE List units of a particular type\n" + " --state=STATE List units with particular LOAD or SUB or ACTIVE state\n" + " --failed Shorcut for --state=failed\n" + " -p --property=NAME Show only properties by this name\n" + " -a --all Show all properties/all units currently in memory,\n" + " including dead/empty ones. To list all units installed on\n" + " the system, use the 'list-unit-files' command instead.\n" + " -l --full Don't ellipsize unit names on output\n" + " -r --recursive Show unit list of host and local containers\n" + " --reverse Show reverse dependencies with 'list-dependencies'\n" + " --job-mode=MODE Specify how to deal with already queued jobs, when\n" + " queueing a new job\n" + " -T --show-transaction\n" + " When enqueuing a unit job, show full transaction\n" + " --show-types When showing sockets, explicitly show their type\n" + " --value When showing properties, only print the value\n" + " -i --ignore-inhibitors\n" + " When shutting down or sleeping, ignore inhibitors\n" + " --kill-who=WHO Who to send signal to\n" + " -s --signal=SIGNAL Which signal to send\n" + " --what=RESOURCES Which types of resources to remove\n" + " --now Start or stop unit in addition to enabling or disabling it\n" + " --dry-run Only print what would be done\n" + " -q --quiet Suppress output\n" + " --wait For (re)start, wait until service stopped again\n" + " For is-system-running, wait until startup is completed\n" + " --no-block Do not wait until operation finished\n" + " --no-wall Don't send wall message before halt/power-off/reboot\n" + " --no-reload Don't reload daemon after en-/dis-abling unit files\n" + " --no-legend Do not print a legend (column headers and hints)\n" + " --no-pager Do not pipe output into a pager\n" + " --no-ask-password\n" + " Do not ask for system passwords\n" + " --global Enable/disable/mask unit files globally\n" + " --runtime Enable/disable/mask unit files temporarily until next\n" + " reboot\n" + " -f --force When enabling unit files, override existing symlinks\n" + " When shutting down, execute action immediately\n" + " --preset-mode= Apply only enable, only disable, or all presets\n" + " --root=PATH Enable/disable/mask unit files in the specified root\n" + " directory\n" + " -n --lines=INTEGER Number of journal entries to show\n" + " -o --output=STRING Change journal output mode (short, short-precise,\n" + " short-iso, short-iso-precise, short-full,\n" + " short-monotonic, short-unix,\n" + " verbose, export, json, json-pretty, json-sse, cat)\n" + " --firmware-setup Tell the firmware to show the setup menu on next boot\n" + " --boot-loader-menu=TIME\n" + " Boot into boot loader menu on next boot\n" + " --boot-loader-entry=NAME\n" + " Boot into a specific boot loader entry on next boot\n" + " --plain Print unit dependencies as a list instead of a tree\n" "\nSee the %2$s for details.\n" , program_invocation_short_name , link diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c index 4553699d1c6..c5d4d198fe1 100644 --- a/src/timedate/timedatectl.c +++ b/src/timedate/timedatectl.c @@ -810,20 +810,8 @@ static int help(void) { return log_oom(); printf("%s [OPTIONS...] COMMAND ...\n\n" - "Query or change system time and date settings.\n\n" - " -h --help Show this help message\n" - " --version Show package version\n" - " --no-pager Do not pipe output into a pager\n" - " --no-ask-password Do not prompt for password\n" - " -H --host=[USER@]HOST Operate on remote host\n" - " -M --machine=CONTAINER Operate on local container\n" - " --adjust-system-clock Adjust system clock when changing local RTC mode\n" - " --monitor Monitor status of systemd-timesyncd\n" - " -p --property=NAME Show only properties by this name\n" - " -a --all Show all properties, including empty ones\n" - " --value When showing properties, only print the value\n" - "\n" - "Commands:\n" + "Query or change system time and date settings.\n" + "\nCommands:\n" " status Show current time settings\n" " show Show properties of systemd-timedated\n" " set-time TIME Set system time\n" @@ -835,6 +823,18 @@ static int help(void) { "systemd-timesyncd Commands:\n" " timesync-status Show status of systemd-timesyncd\n" " show-timesync Show properties of systemd-timesyncd\n" + "\nOptions\n" + " -h --help Show this help message\n" + " --version Show package version\n" + " --no-pager Do not pipe output into a pager\n" + " --no-ask-password Do not prompt for password\n" + " -H --host=[USER@]HOST Operate on remote host\n" + " -M --machine=CONTAINER Operate on local container\n" + " --adjust-system-clock Adjust system clock when changing local RTC mode\n" + " --monitor Monitor status of systemd-timesyncd\n" + " -p --property=NAME Show only properties by this name\n" + " -a --all Show all properties, including empty ones\n" + " --value When showing properties, only print the value\n" "\nSee the %s for details.\n" , program_invocation_short_name , link -- 2.39.2