HALF ECHO LEARN / REFERENCE COLLECTION

v262.2

man/systemctl.xml

165,112 bytesGit mode 100644Download original fileLGPL-2.1-or-later

Git blob: b67a7efabcd07f37520a1232e63e3e99dd654150

Lines 1001–2000 of 3,119

          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>reenable <replaceable>UNIT</replaceable>…</command></term>
 
          <listitem>
            <para>Reenable one or more units, as specified on the command line. This is a combination of
            <command>disable</command> and <command>enable</command> 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.</para>
 
            <para>This command implicitly reloads the system manager configuration after completing the operation.
            Note that this command does not implicitly restart the units that are being disabled. If this is
            desired, either combine this command with the <option>--now</option> switch, or invoke
            the <command>try-restart</command> command with appropriate arguments later.</para>
 
            <xi:include href="version-info.xml" xpointer="v238"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>preset <replaceable>UNIT</replaceable>…</command></term>
 
          <listitem>
            <para>Reset the enable/disable status of 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 <command>disable</command> or
            <command>enable</command>, depending how the unit is listed in the preset
            files.</para>
 
            <para>Use <option>--preset-mode=</option> to control whether units shall be
            enabled and disabled, or only enabled, or only disabled.</para>
 
            <para>If the unit carries no install information, it will be silently ignored
            by this command. <replaceable>UNIT</replaceable> must be the real unit name,
            any alias names are ignored silently.</para>
 
            <para>For more information on the preset policy format, see
            <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
            </para>
 
            <xi:include href="version-info.xml" xpointer="v238"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>preset-all</command></term>
 
          <listitem>
            <para>Resets all installed unit files to the defaults
            configured in the preset policy file (see above).</para>
 
            <para>Use <option>--preset-mode=</option> to control
            whether units shall be enabled and disabled, or only
            enabled, or only disabled.</para>
 
            <xi:include href="version-info.xml" xpointer="v215"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>is-enabled <replaceable>UNIT</replaceable>…</command></term>
 
          <listitem>
            <para>Checks whether any of the specified unit files are
            enabled (as with <command>enable</command>). 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 <option>--quiet</option>.
            To show installation targets, use <option>--full</option>.
            </para>
 
            <table>
              <title>
                <command>is-enabled</command> output
              </title>
 
              <tgroup cols='3'>
                <thead>
                  <row>
                    <entry>Name</entry>
                    <entry>Description</entry>
                    <entry>Exit Code</entry>
                  </row>
                </thead>
                <tbody>
                  <row>
                    <entry><literal>enabled</literal></entry>
                    <entry morerows='1'>Enabled via <filename>.wants/</filename>, <filename>.requires/</filename> or <varname>Alias=</varname> symlinks (permanently in <filename>/etc/systemd/system/</filename>, or transiently in <filename>/run/systemd/system/</filename>).</entry>
                    <entry morerows='1'>0</entry>
                  </row>
                  <row>
                    <entry><literal>enabled-runtime</literal></entry>
                  </row>
                  <row>
                    <entry><literal>linked</literal></entry>
                    <entry morerows='1'>Made available through one or more symlinks to the unit file (permanently in <filename>/etc/systemd/system/</filename> or transiently in <filename>/run/systemd/system/</filename>), even though the unit file might reside outside of the unit file search path.</entry>
                    <entry morerows='1'>&gt; 0</entry>
                  </row>
                  <row>
                    <entry><literal>linked-runtime</literal></entry>
                  </row>
                  <row>
                    <entry><literal>alias</literal></entry>
                    <entry>The name is an alias (symlink to another unit file).</entry>
                    <entry>0</entry>
                  </row>
                  <row>
                    <entry><literal>masked</literal></entry>
                    <entry morerows='1'>Completely disabled, so that any start operation on it fails (permanently in <filename>/etc/systemd/system/</filename> or transiently in <filename>/run/systemd/systemd/</filename>).</entry>
                    <entry morerows='1'>&gt; 0</entry>
                  </row>
                  <row>
                    <entry><literal>masked-runtime</literal></entry>
                  </row>
                  <row>
                    <entry><literal>static</literal></entry>
                    <entry>The unit file is not enabled, and has no provisions for enabling in the [Install] unit file section.</entry>
                    <entry>0</entry>
                  </row>
                  <row>
                    <entry><literal>indirect</literal></entry>
                    <entry>The unit file itself is not enabled, but it has a non-empty <varname>Also=</varname> 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 <varname>Also=</varname>. For template unit files, an instance different than the one specified in <varname>DefaultInstance=</varname> is enabled.</entry>
                    <entry>0</entry>
                  </row>
                  <row>
                    <entry><literal>disabled</literal></entry>
                    <entry>The unit file is not enabled, but contains an [Install] section with installation instructions.</entry>
                    <entry>&gt; 0</entry>
                  </row>
                  <row>
                    <entry><literal>generated</literal></entry>
                    <entry>The unit file was generated dynamically via a generator tool. See <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>. Generated unit files may not be enabled, they are enabled implicitly by their generator.</entry>
                    <entry>0</entry>
                  </row>
                  <row>
                    <entry><literal>transient</literal></entry>
                    <entry>The unit file has been created dynamically with the runtime API. Transient units may not be enabled.</entry>
                    <entry>0</entry>
                  </row>
                  <row>
                    <entry><literal>bad</literal></entry>
                    <entry>The unit file is invalid or another error occurred. Note that <command>is-enabled</command> will not actually return this state, but print an error message instead. However, the unit file listing printed by <command>list-unit-files</command> might show it.</entry>
                    <entry>&gt; 0</entry>
                  </row>
                  <row>
                    <entry><literal>not-found</literal></entry>
                    <entry>The unit file does not exist.</entry>
                    <entry>4</entry>
                  </row>
                </tbody>
              </tgroup>
            </table>
 
            <xi:include href="version-info.xml" xpointer="v238"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>mask <replaceable>UNIT</replaceable>…</command></term>
 
          <listitem>
            <para>Mask one or more units, as specified on the command line. This will link these unit files
            to <filename>/dev/null</filename>, making it impossible to start them. This is a stronger version
            of <command>disable</command>, since it prohibits all kinds of activation of the unit, including
            enablement and manual activation. Use this option with care. This honors the
            <option>--runtime</option> option to only mask temporarily until the next reboot of the
            system. The <option>--now</option> 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.</para>
 
            <para>Note that this will create a symlink under the unit's name in
            <filename>/etc/systemd/system/</filename> (in case <option>--runtime</option> is not specified)
            or <filename>/run/systemd/system/</filename> (in case <option>--runtime</option> is
            specified). If a matching unit file already exists under these directories this operation will
            hence fail. This means that the operation is primarily useful to mask units shipped by the vendor
            (as those are shipped in <filename>/usr/lib/systemd/system/</filename> and not the aforementioned
            two directories), but typically does not work for units created locally (as those are typically
            placed precisely in the two aforementioned directories). Similar restrictions apply for
            <option>--user</option> mode, in which case the directories are below the user's home directory
            however.</para>
 
            <para>If a unit gets masked but its triggering units are still active, a warning containing
            the names of the triggering units is shown. <option>--no-warn</option> can be used to suppress
            the warning.</para>
 
            <xi:include href="version-info.xml" xpointer="v238"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>unmask <replaceable>UNIT</replaceable>…</command></term>
 
          <listitem>
            <para>Unmask one or more unit files, as specified on the command line. This will undo the effect of
            <command>mask</command>. This command expects valid unit names only, it does not accept unit file
            paths.</para>
 
            <xi:include href="version-info.xml" xpointer="v238"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>link <replaceable>PATH</replaceable>…</command></term>
 
          <listitem>
            <para>Link a unit file that is not in the unit file search path into the unit file search path. This
            command expects an absolute path to a unit file. The effect of this may be undone with
            <command>disable</command>. The effect of this command is that a unit file is made available for commands
            such as <command>start</command>, 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 <filename>/home/</filename> or <filename>/var/</filename> is not allowed, unless
            those directories are located on the root file system).</para>
 
            <xi:include href="version-info.xml" xpointer="v233"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>revert <replaceable>UNIT</replaceable>…</command></term>
 
          <listitem>
            <para>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 <literal>foo.service</literal> the matching directories
            <literal>foo.service.d/</literal> with all their contained files are removed, both below the persistent and
            runtime configuration directories (i.e. below <filename>/etc/systemd/system</filename> and
            <filename>/run/systemd/system</filename>); if the unit file has a vendor-supplied version (i.e. a unit file
            located below <filename>/usr/</filename>) 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
            <filename>/etc/systemd/system</filename> or <filename>/run/systemd/system</filename>, but not in a unit
            file stored below <filename>/usr/</filename>), then it is not removed. Also, if a unit is masked, it is
            unmasked.</para>
 
            <para>Effectively, this command may be used to undo all changes made with <command>systemctl
            edit</command>, <command>systemctl set-property</command> and <command>systemctl mask</command> and puts
            the original unit file with its settings back in effect.</para>
 
            <xi:include href="version-info.xml" xpointer="v230"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>add-wants <replaceable>TARGET</replaceable>
          <replaceable>UNIT</replaceable>…</command></term>
          <term><command>add-requires <replaceable>TARGET</replaceable>
          <replaceable>UNIT</replaceable>…</command></term>
 
          <listitem>
            <para>Adds <literal>Wants=</literal> or <literal>Requires=</literal>
            dependencies, respectively, to the specified
            <replaceable>TARGET</replaceable> for one or more units. </para>
 
            <para>This command honors <option>--system</option>,
            <option>--user</option>, <option>--runtime</option> and
            <option>--global</option> in a way similar to
            <command>enable</command>.</para>
 
            <xi:include href="version-info.xml" xpointer="v217"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>edit <replaceable>UNIT</replaceable>…</command></term>
 
          <listitem>
            <para>Edit or replace a drop-in snippet or the main unit file, to extend or override the
            definition of the specified unit.</para>
 
            <para>Depending on whether <option>--system</option> (the default), <option>--user</option>, or
            <option>--global</option> is specified, this command will operate on the system unit files, unit
            files for the calling user, or the unit files shared between all users.</para>
 
            <para>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. After the editing is finished,
            configuration is reloaded, equivalent to <command>systemctl daemon-reload --system</command> or
            <command>systemctl daemon-reload --user</command>. For <command>edit --global</command>, the
            reload is not performed and the edits will take effect only for subsequent logins (or after a
            reload is requested in a different way).</para>
 
            <para>If <option>--full</option> is specified, a replacement for the main unit file will be
            created or edited. Otherwise, a drop-in file will be created or edited.</para>
 
            <para>If <option>--drop-in=</option> is specified, the given drop-in file name
            will be used instead of the default <filename>override.conf</filename>.</para>
 
            <para>The unit must exist, i.e. its main unit file must be present. If <option>--force</option>
            is specified, this requirement is ignored and a new unit may be created (with
            <option>--full</option>), or a drop-in for a nonexistent unit may be created.</para>
 
            <para>If <option>--runtime</option> is specified, the changes will
            be made temporarily in <filename>/run/</filename> and they will be
            lost on the next reboot.</para>
 
            <para>If <option>--stdin</option> is specified, the new contents will be read from standard
            input. In this mode, the old contents of the file are discarded.</para>
 
            <para>If the temporary file is empty upon exit, the modification of
            the related unit is canceled.</para>
 
            <para>Note that this command cannot be used to remotely edit units
            and that you cannot temporarily edit units which are in
            <filename>/etc/</filename>, since they take precedence over
            <filename>/run/</filename>.</para>
 
            <xi:include href="version-info.xml" xpointer="v218"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>get-default</command></term>
 
          <listitem>
            <para>Return the default target to boot into. This returns
            the target unit name <filename>default.target</filename>
            is aliased (symlinked) to.</para>
 
            <xi:include href="version-info.xml" xpointer="v205"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>set-default <replaceable>TARGET</replaceable></command></term>
 
          <listitem>
            <para>Set the default target to boot into. This sets
            (symlinks) the <filename>default.target</filename> alias
            to the given target unit.</para>
 
            <xi:include href="version-info.xml" xpointer="v205"/>
          </listitem>
        </varlistentry>
 
      </variablelist>
    </refsect2>
 
    <refsect2>
      <title>Machine Commands</title>
 
      <variablelist>
        <varlistentry>
          <term><command>list-machines</command> <optional><replaceable>PATTERN</replaceable>…</optional></term>
 
          <listitem>
            <para>List the host and all running local containers with
            their state. If one or more
            <replaceable>PATTERN</replaceable>s are specified, only
            containers matching one of them are shown.
            </para>
 
            <xi:include href="version-info.xml" xpointer="v212"/>
          </listitem>
        </varlistentry>
      </variablelist>
    </refsect2>
 
    <refsect2>
      <title>Job Commands</title>
 
      <variablelist>
        <varlistentry>
          <term><command>list-jobs <optional><replaceable>PATTERN…</replaceable></optional></command></term>
 
          <listitem>
            <para>List jobs that are in progress. If one or more
            <replaceable>PATTERN</replaceable>s are specified, only
            jobs for units matching one of them are shown.</para>
 
            <para>When combined with <option>--after</option> or <option>--before</option> 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.</para>
 
            <xi:include href="version-info.xml" xpointer="v233"/>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term><command>cancel <optional><replaceable>JOB</replaceable>…</optional></command></term>
 
          <listitem>
            <para>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.</para>
 
            <xi:include href="version-info.xml" xpointer="v233"/>
          </listitem>
        </varlistentry>
      </variablelist>
    </refsect2>
 
    <refsect2>
      <title>Environment Commands</title>
 
      <para><command>systemd</command> supports an environment block that is passed to processes the manager
      spawns. The names of the variables can contain ASCII letters, digits, and the underscore
      character. Variable names cannot be empty or start with a digit. In variable values, most characters
      are allowed, but the whole sequence must be valid UTF-8. (Note that control characters like newline
      (<constant>NL</constant>), tab (<constant>TAB</constant>), or the escape character
      (<constant>ESC</constant>), <emphasis>are</emphasis> valid ASCII and thus valid UTF-8). The total
      length of the environment block is limited to <constant>_SC_ARG_MAX</constant> value defined by
      <citerefentry project='man-pages'><refentrytitle>sysconf</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
      </para>
 
      <variablelist>
        <varlistentry>
          <term><command>show-environment</command></term>
 
          <listitem>
            <para>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 straightforward 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
            <literal>VARIABLE=value</literal>. If whitespace or characters which have special meaning to the
            shell are present, dollar-single-quote escaping is used, and assignments have the form
            <literal>VARIABLE=$'value'</literal>.  This syntax is known to be supported by <citerefentry
            project='die-net'><refentrytitle>bash</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
            <citerefentry
            project='die-net'><refentrytitle>zsh</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
            <citerefentry
            project='die-net'><refentrytitle>ksh</refentrytitle><manvolnum>1</manvolnum></citerefentry>, and
            <citerefentry
            project='die-net'><refentrytitle>busybox</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
            <citerefentry
            project='die-net'><refentrytitle>ash</refentrytitle><manvolnum>1</manvolnum></citerefentry>, but
            not <citerefentry
            project='die-net'><refentrytitle>dash</refentrytitle><manvolnum>1</manvolnum></citerefentry> or
            <citerefentry
            project='die-net'><refentrytitle>fish</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
            </para>
 
            <para>Note that this shows the <emphasis>effective</emphasis> block, i.e. the combination of
            environment variables configured via configuration files, environment generators and via IPC
            (i.e. via the <command>set-environment</command> described below). At the moment a unit process
            is forked off, this combined environment block will be further combined with per-unit environment
            variables, which are not visible in this command.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term><command>set-environment <replaceable>VARIABLE=VALUE</replaceable>…</command></term>
 
          <listitem>
            <para>Set one or more service manager environment variables, as specified on the command
            line. This command will fail if variable names and values do not conform to the rules listed
            above.</para>
 
            <para>Note that this operates on an environment block separate from the environment block
            configured from service manager configuration and environment generators. Whenever a process is
            invoked the two blocks are combined (also incorporating any per-service environment variables),
            and passed to it. The <command>show-environment</command> verb will show the combination of the
            blocks, see above.</para>
 
            <xi:include href="version-info.xml" xpointer="v233"/>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term><command>unset-environment <replaceable>VARIABLE</replaceable>…</command></term>
 
          <listitem>
            <para>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.</para>
 
            <para>Note that this operates on an environment block separate from the environment block
            configured from service manager configuration and environment generators. Whenever a process is
            invoked the two blocks are combined (also incorporating any per-service environment variables),
            and passed to it. The <command>show-environment</command> verb will show the combination of the
            blocks, see above. Note that this means this command cannot be used to unset environment
            variables defined in the service manager configuration files or via generators.</para>
 
            <xi:include href="version-info.xml" xpointer="v233"/>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>
            <command>import-environment</command>
            <replaceable>VARIABLE…</replaceable>
          </term>
 
          <listitem>
            <para>Import all, one or more environment variables set on the client into the systemd manager
            environment block. If a list of environment variable names is passed, client-side values are then
            imported into the manager's environment block. If any names are not valid environment variable
            names or have invalid values according to the rules described above, an error is raised. If no
            arguments are passed, the entire environment block inherited by the <command>systemctl</command>
            process is imported. In this mode, any inherited invalid environment variables are quietly
            ignored.</para>
 
            <para>Importing of the full inherited environment block (calling this command without any
            arguments) is deprecated. A shell will set dozens of variables which only make sense locally and
            are only meant for processes which are descendants of the shell. Such variables in the global
            environment block are confusing to other processes.</para>
 
            <xi:include href="version-info.xml" xpointer="v209"/>
          </listitem>
        </varlistentry>
      </variablelist>
    </refsect2>
 
    <refsect2>
      <title>Manager State Commands</title>
 
      <variablelist>
        <varlistentry>
          <term><command>daemon-reload</command></term>
 
          <listitem>
            <para>Reload the systemd manager configuration. This will
            rerun all generators (see
            <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
            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.</para>
 
            <para>This command should not be confused with the
            <command>reload</command> command.</para>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>daemon-reexec</command></term>
 
          <listitem>
            <para>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 <command>daemon-reload</command>.
            While the daemon is being reexecuted, all sockets systemd listening
            on behalf of user configuration will stay accessible.
            </para>
          </listitem>
        </varlistentry>
 
        <varlistentry id='log-level'>
          <term><command>log-level</command> [<replaceable>LEVEL</replaceable>]</term>
 
          <listitem><para>If no argument is given, print the current log level of the manager. If an
          optional argument <replaceable>LEVEL</replaceable> is provided, then the command changes the
          current log level of the manager to <replaceable>LEVEL</replaceable> (accepts the same values as
          <option>--log-level=</option> described in
          <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
          </para>
 
          <xi:include href="version-info.xml" xpointer="v244"/></listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>log-target</command> [<replaceable>TARGET</replaceable>]</term>
 
          <listitem><para>If no argument is given, print the current log target of the manager. If an
          optional argument <replaceable>TARGET</replaceable> is provided, then the command changes the
          current log target of the manager to <replaceable>TARGET</replaceable> (accepts the same values as
          <option>--log-target=</option>, described in
          <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
          </para>
 
          <xi:include href="version-info.xml" xpointer="v244"/></listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>service-watchdogs</command> [yes|no]</term>
 
          <listitem><para>If no argument is given, print the current state of service runtime watchdogs of
          the manager. If an optional boolean argument is provided, then globally enables or disables the
          service runtime watchdogs (<option>WatchdogSec=</option>) and emergency actions (e.g.
          <option>OnFailure=</option> or <option>StartLimitAction=</option>); see
          <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
          The hardware watchdog is not affected by this setting.</para>
 
          <xi:include href="version-info.xml" xpointer="v244"/></listitem>
        </varlistentry>
      </variablelist>
    </refsect2>
 
    <refsect2>
      <title>System Commands</title>
 
      <variablelist>
        <varlistentry>
          <term><command>is-system-running</command></term>
 
          <listitem>
            <para>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 <option>--quiet</option> to
            suppress this output.</para>
 
            <para>Use <option>--wait</option> to wait until the boot
            process is completed before printing the current state and
            returning the appropriate error status. If <option>--wait</option>
            is in use, states <varname>initializing</varname> or
            <varname>starting</varname> will not be reported, instead
            the command will block until a later state (such as
            <varname>running</varname> or <varname>degraded</varname>)
            is reached.</para>
 
            <table>
              <title><command>is-system-running</command> output</title>
              <tgroup cols='3'>
                <colspec colname='name'/>
                <colspec colname='description'/>
                <colspec colname='exit-code'/>
                <thead>
                  <row>
                    <entry>Name</entry>
                    <entry>Description</entry>
                    <entry>Exit Code</entry>
                  </row>
                </thead>
                <tbody>
                  <row>
                    <entry><varname>initializing</varname></entry>
                    <entry><para>Early bootup, before
                    <filename>basic.target</filename> is reached
                    or the <varname>maintenance</varname> state entered.
                    </para></entry>
                    <entry>&gt; 0</entry>
                  </row>
                  <row>
                    <entry><varname>starting</varname></entry>
                    <entry><para>Late bootup, before the job queue
                    becomes idle for the first time, or one of the
                    rescue targets are reached.</para></entry>
                    <entry>&gt; 0</entry>
                  </row>
                  <row>
                    <entry><varname>running</varname></entry>
                    <entry><para>The system is fully
                    operational.</para></entry>
                    <entry>0</entry>
                  </row>
                  <row>
                    <entry><varname>degraded</varname></entry>
                    <entry><para>The system is operational but one or more
                    units failed.</para></entry>
                    <entry>&gt; 0</entry>
                  </row>
                  <row>
                    <entry><varname>maintenance</varname></entry>
                    <entry><para>The rescue or emergency target is
                    active.</para></entry>
                    <entry>&gt; 0</entry>
                  </row>
                  <row>
                    <entry><varname>stopping</varname></entry>
                    <entry><para>The manager is shutting
                    down.</para></entry>
                    <entry>&gt; 0</entry>
                  </row>
                  <row>
                    <entry><varname>offline</varname></entry>
                    <entry><para>The manager is not
                    running. Specifically, this is the operational
                    state if an incompatible program is running as
                    system manager (PID 1).</para></entry>
                    <entry>&gt; 0</entry>
                  </row>
                  <row>
                    <entry><varname>unknown</varname></entry>
                    <entry><para>The operational state could not be
                    determined, due to lack of resources or another
                    error cause.</para></entry>
                    <entry>&gt; 0</entry>
                  </row>
                </tbody>
              </tgroup>
            </table>
 
            <xi:include href="version-info.xml" xpointer="v215"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>default</command></term>
 
          <listitem>
            <para>Enter default mode. This is equivalent to <command>systemctl isolate default.target</command>. This
            operation is blocking by default, use <option>--no-block</option> to request asynchronous behavior.</para>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>rescue</command></term>
 
          <listitem>
            <para>Enter rescue mode. This is equivalent to <command>systemctl isolate rescue.target</command>. This
            operation is blocking by default, use <option>--no-block</option> to request asynchronous behavior.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term><command>emergency</command></term>
 
          <listitem>
            <para>Enter emergency mode. This is equivalent to <command>systemctl isolate
            emergency.target</command>. This operation is blocking by default, use <option>--no-block</option> to
            request asynchronous behavior.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term><command>halt</command></term>
 
          <listitem>
            <para>Shut down and halt the system. This is mostly equivalent to <command>systemctl start halt.target
            --job-mode=replace-irreversibly --no-block</command>, 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 <command>systemctl poweroff</command> for powering off the system (see below).</para>
 
            <para>If combined with <option>--force</option>, 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 <option>--force</option> 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
            <option>--force</option> is specified twice the halt operation is executed by <command>systemctl</command>
            itself, and the system manager is not contacted. This means the command should succeed even when the system
            manager has crashed.</para>
 
            <para>If combined with <option>--when=</option>, shutdown will be scheduled after the given timestamp.
            And <option>--when=cancel</option> will cancel the shutdown.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term><command>poweroff</command></term>
 
          <listitem>
            <para>Shut down and power-off the system. This is mostly equivalent to <command>systemctl start
            poweroff.target --job-mode=replace-irreversibly --no-block</command>, 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.</para>
 
            <para>This command honors <option>--force</option> and <option>--when=</option> in a similar way
            as <command>halt</command>.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term><command>reboot</command></term>
 
          <listitem>
            <para>Shut down and reboot the system.</para>
 
            <para>This command is mostly equivalent to <command>systemctl start reboot.target
            --job-mode=replace-irreversibly --no-block</command>, 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.</para>
 
            <para>If the switch <option>--reboot-argument=</option> is given, it will be passed as the optional
            argument to the <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
            system call.</para>
 
            <para>Options <option>--boot-loader-entry=</option>, <option>--boot-loader-menu=</option>, and
            <option>--firmware-setup</option> can be used to select what to do <emphasis>after</emphasis> the
            reboot. See the descriptions of those options for details.</para>
 
            <para>This command honors <option>--force</option> and <option>--when=</option> in a similar way
            as <command>halt</command>.</para>
 
            <para>If a new kernel has been loaded via <command>kexec --load</command>, a
            <command>kexec</command> will be performed instead of a reboot, unless
            <literal>SYSTEMCTL_SKIP_AUTO_KEXEC=1</literal> has been set. If a new root file system has
            been set up on <literal>/run/nextroot/</literal>, a <command>soft-reboot</command> will be
            performed instead of a reboot, unless <literal>SYSTEMCTL_SKIP_AUTO_SOFT_REBOOT=1</literal> has
            been set.</para>
 
            <xi:include href="version-info.xml" xpointer="v246"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>kexec</command></term>
 
          <listitem>
            <para>Shut down and reboot the system via <command>kexec</command>. This command will load a
            kexec kernel if one was not loaded yet or fail. A kernel may be loaded earlier by a separate step,
            this is particularly useful if a custom initrd or additional kernel command line options are
            desired. The <option>--force</option> can be used to continue without a kexec kernel, i.e. to
            perform a normal reboot. The final reboot step is equivalent to
            <command>systemctl start kexec.target --job-mode=replace-irreversibly --no-block</command>.
            </para>
 
            <para>To load a kernel, an enumeration is performed following the
            <ulink url="https://uapi-group.org/specifications/specs/boot_loader_specification">UAPI.1 Boot Loader Specification</ulink>,
            and the default boot entry is loaded. For this step to succeed, the system must be using UEFI
            and the boot loader entries must be configured appropriately. <command>bootctl list</command>
            may be used to list boot entries, see
            <citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
            </para>
 
            <para>This command is asynchronous; it will return after the reboot operation is enqueued,
            without waiting for it to complete.</para>
 
            <para>This command honors <option>--force</option> and <option>--when=</option> similarly
            to <command>halt</command>.</para>
 
            <para>If a new kernel has been loaded via <command>kexec --load</command>, a
            <command>kexec</command> will be performed when <command>reboot</command> is invoked, unless
            <literal>SYSTEMCTL_SKIP_AUTO_KEXEC=1</literal> has been set.</para>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>soft-reboot</command></term>
 
          <listitem>
            <para>Shut down and reboot userspace. This is equivalent to <command>systemctl start
            soft-reboot.target --job-mode=replace-irreversibly --no-block</command>. This command is
            asynchronous; it will return after the reboot operation is enqueued, without waiting for it to
            complete.</para>
 
            <para>This command honors <option>--force</option> and <option>--when=</option> in a similar way
            as <command>halt</command>.</para>
 
            <para>This operation only reboots userspace, leaving the kernel running. See
            <citerefentry><refentrytitle>systemd-soft-reboot.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
            for details.</para>
 
            <para>If a new root file system has been set up on <literal>/run/nextroot/</literal>, a
            <command>soft-reboot</command> will be performed when <command>reboot</command> is invoked,
            unless <literal>SYSTEMCTL_SKIP_AUTO_SOFT_REBOOT=1</literal> has been set.</para>
 
            <xi:include href="version-info.xml" xpointer="v254"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>exit</command> <optional><replaceable>EXIT_CODE</replaceable></optional></term>
 
          <listitem>
            <para>Ask the service manager to quit. This is only supported for user service managers (i.e. in
            conjunction with the <option>--user</option> option) or in containers and is equivalent to
            <command>poweroff</command> otherwise. This command is asynchronous; it will return after the exit
            operation is enqueued, without waiting for it to complete.</para>
 
            <para>The service manager will exit with the specified exit code, if
            <replaceable>EXIT_CODE</replaceable> is passed.</para>
 
            <xi:include href="version-info.xml" xpointer="v227"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>switch-root</command> <optional><replaceable>ROOT</replaceable> <optional><replaceable>INIT</replaceable></optional></optional></term>
 
          <listitem>
            <para>Switches to a different root directory and executes a new system manager process below it.
            This is intended for use in the initrd, and will transition from the initrd's system manager
            process (a.k.a. "init" process, PID 1) to the main system manager process which is loaded from
            the actual host root files system. 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 both are omitted or the former is an empty string it defaults to
            <filename>/sysroot/</filename>. If the latter is omitted or is an empty string, a systemd binary
            will automatically be searched for and used as service manager. 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.</para>
 
            <xi:include href="version-info.xml" xpointer="v209"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>sleep</command></term>
 
          <listitem>
            <para>Put the system to sleep, through <command>suspend</command>, <command>hibernate</command>,
            <command>hybrid-sleep</command>, or <command>suspend-then-hibernate</command>. The sleep operation
            to use is automatically selected by <citerefentry>
            <refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
            By default, <command>suspend-then-hibernate</command> is used, and falls back to <command>suspend</command>
            and then <command>hibernate</command> if not supported. Refer to <varname>SleepOperation=</varname>
            setting in <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
            for more details. This command is asynchronous, and will return after the sleep operation is
            successfully enqueued. It will not wait for the sleep/resume cycle to complete.</para>
 
            <xi:include href="version-info.xml" xpointer="v256"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>suspend</command></term>
 
          <listitem>
            <para>Suspend the system. This will trigger activation of the special target unit
            <filename>suspend.target</filename>. 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.</para>
 
            <para>If <option>--force</option> is specified, and <command>systemd-logind</command> returned
            error for the operation, the error will be ignored and the operation will be tried again directly
            through starting the target unit.</para>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>hibernate</command></term>
 
          <listitem>
            <para>Hibernate the system. This will trigger activation of the special target unit
            <filename>hibernate.target</filename>. 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.</para>
 
            <para>This command honors <option>--force</option> in the same way as <command>suspend</command>.</para>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>hybrid-sleep</command></term>
 
          <listitem>
            <para>Hibernate and suspend the system. This will trigger activation of the special target unit
            <filename>hybrid-sleep.target</filename>. 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.</para>
 
            <para>This command honors <option>--force</option> in the same way as <command>suspend</command>.</para>
 
            <xi:include href="version-info.xml" xpointer="v196"/>
          </listitem>
        </varlistentry>
 
        <varlistentry>
          <term><command>suspend-then-hibernate</command></term>
 
          <listitem>
            <para>Suspend the system and hibernate it when the battery is low, or when the delay specified
            in <filename>systemd-sleep.conf</filename> elapsed. This will trigger activation of the special
            target unit <filename>suspend-then-hibernate.target</filename>. 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.</para>
 
            <para>This command honors <option>--force</option> in the same way as <command>suspend</command>.</para>
 
            <xi:include href="version-info.xml" xpointer="v240"/>
          </listitem>
        </varlistentry>
      </variablelist>
    </refsect2>
 
    <refsect2>
      <title>Parameter Syntax</title>
 
      <para>Unit commands listed above take either a single unit name (designated as <replaceable>UNIT</replaceable>),
      or multiple unit specifications (designated as <replaceable>PATTERN</replaceable>…). 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, <literal>.service</literal> by default, and a type-specific suffix in
      case of commands which operate only on specific unit types. For example,
      <programlisting># systemctl start sshd</programlisting> and
      <programlisting># systemctl start sshd.service</programlisting>
      are equivalent, as are
      <programlisting># systemctl isolate default</programlisting>
      and
      <programlisting># systemctl isolate default.target</programlisting>
      Note that (absolute) paths to device nodes are automatically converted to device unit names, and other (absolute)
      paths to mount unit names.
      <programlisting># systemctl status /dev/sda
# systemctl status /home</programlisting>
      are equivalent to:
      <programlisting># systemctl status dev-sda.device
# systemctl status home.mount</programlisting>
      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.</para>
 
      <para>Glob patterns use
      <citerefentry project='man-pages'><refentrytitle>fnmatch</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
      so normal shell-style globbing rules are used, and
      <literal>*</literal>, <literal>?</literal>,
      <literal>[]</literal> may be used. See
      <citerefentry project='man-pages'><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
      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:
      <programlisting># systemctl stop "sshd@*.service"</programlisting>
      will stop all <filename>sshd@.service</filename> instances. Note that alias names of units, and units that are not
      in memory are not considered for glob expansion.
      </para>
 
      <para>For unit file commands, the specified <replaceable>UNIT</replaceable> should be the name of the unit file
      (possibly abbreviated, see above), or the absolute path to the unit file:
      <programlisting># systemctl enable foo.service</programlisting>
      or
      <programlisting># systemctl link /path/to/foo.service</programlisting>
      </para>
    </refsect2>
 
  </refsect1>
 
  <refsect1>
    <title>Options</title>
 
    <para>The following options are understood:</para>
 
    <variablelist>
      <varlistentry>
        <term><option>-t</option></term>
        <term><option>--type=</option></term>
 
        <listitem>
          <para>The argument is a comma-separated list of unit types such as <option>service</option> and