1<?xml version='1.0'?>
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4<!ENTITY % entities SYSTEM "custom-entities.ent" >
5%entities;
6]>
7<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
8
9<refentry id="systemctl"
10          xmlns:xi="http://www.w3.org/2001/XInclude">
11
12  <refentryinfo>
13    <title>systemctl</title>
14    <productname>systemd</productname>
15  </refentryinfo>
16
17  <refmeta>
18    <refentrytitle>systemctl</refentrytitle>
19    <manvolnum>1</manvolnum>
20  </refmeta>
21
22  <refnamediv>
23    <refname>systemctl</refname>
24    <refpurpose>Control the systemd system and service manager</refpurpose>
25  </refnamediv>
26
27  <refsynopsisdiv>
28    <cmdsynopsis>
29      <command>systemctl</command>
30      <arg choice="opt" rep="repeat">OPTIONS</arg>
31      <arg choice="plain">COMMAND</arg>
32      <arg choice="opt" rep="repeat">UNIT</arg>
33    </cmdsynopsis>
34  </refsynopsisdiv>
35
36  <refsect1>
37    <title>Description</title>
38
39    <para><command>systemctl</command> may be used to introspect and
40    control the state of the <literal>systemd</literal> system and
41    service manager. Please refer to
42    <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
43    for an introduction into the basic concepts and functionality this
44    tool manages.</para>
45  </refsect1>
46
47  <refsect1>
48    <title>Commands</title>
49
50    <para>The following commands are understood:</para>
51
52    <refsect2>
53      <title>Unit Commands (Introspection and Modification)</title>
54
55      <variablelist>
56        <varlistentry>
57          <term><command>list-units</command> <optional><replaceable>PATTERN</replaceable>…</optional></term>
58
59          <listitem>
60            <para>List units that <command>systemd</command> currently has in memory. This includes units that are
61            either referenced directly or through a dependency, units that are pinned by applications programmatically,
62            or units that were active in the past and have failed. By default only units which are active, have pending
63            jobs, or have failed are shown; this can be changed with option <option>--all</option>. If one or more
64            <replaceable>PATTERN</replaceable>s are specified, only units matching one of them are shown. The units
65            that are shown are additionally filtered by <option>--type=</option> and <option>--state=</option> if those
66            options are specified.</para>
67
68            <para>Note that this command does not show unit templates, but only instances of unit
69            templates. Units templates that aren't instantiated are not runnable, and will thus never show up
70            in the output of this command. Specifically this means that <filename>foo@.service</filename>
71            will never be shown in this list — unless instantiated, e.g. as
72            <filename>foo@bar.service</filename>. Use <command>list-unit-files</command> (see below) for
73            listing installed unit template files.</para>
74
75            <para>Produces output similar to
76            <programlisting>  UNIT                         LOAD   ACTIVE SUB     DESCRIPTION
77  sys-module-fuse.device       loaded active plugged /sys/module/fuse
78  -.mount                      loaded active mounted Root Mount
79  boot-efi.mount               loaded active mounted /boot/efi
80  systemd-journald.service     loaded active running Journal Service
81  systemd-logind.service       loaded active running Login Service
82● user@1000.service            loaded failed failed  User Manager for UID 1000
8384  systemd-tmpfiles-clean.timer loaded active waiting Daily Cleanup of Temporary Directories
85
86LOAD   = Reflects whether the unit definition was properly loaded.
87ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
88SUB    = The low-level unit activation state, values depend on unit type.
89
90123 loaded units listed. Pass --all to see loaded but inactive units, too.
91To show all installed unit files use 'systemctl list-unit-files'.</programlisting></para>
92
93            <para>The header and the last unit of a given type are underlined if the terminal supports
94            that. A colored dot is shown next to services which were masked, not found, or otherwise
95            failed.</para>
96
97            <para>The LOAD column shows the load state, one of <constant>loaded</constant>,
98            <constant>not-found</constant>, <constant>bad-setting</constant>, <constant>error</constant>,
99            <constant>masked</constant>. The ACTIVE columns shows the general unit state, one of
100            <constant>active</constant>, <constant>reloading</constant>, <constant>inactive</constant>,
101            <constant>failed</constant>, <constant>activating</constant>, <constant>deactivating</constant>. The SUB
102            column shows the unit-type-specific detailed state of the unit, possible values vary by unit type. The list
103            of possible LOAD, ACTIVE, and SUB states is not constant and new systemd releases may both add and remove
104            values. <programlisting>systemctl --state=help</programlisting> command maybe be used to display the
105            current set of possible values.</para>
106
107            <para>This is the default command.</para>
108          </listitem>
109        </varlistentry>
110
111        <varlistentry>
112          <term><command>list-sockets</command> <optional><replaceable>PATTERN</replaceable>…</optional></term>
113
114          <listitem>
115            <para>List socket units currently in memory, ordered by listening address.  If one or more
116            <replaceable>PATTERN</replaceable>s are specified, only socket units matching one of them are
117            shown. Produces output similar to
118            <programlisting>
119LISTEN           UNIT                        ACTIVATES
120/dev/initctl     systemd-initctl.socket      systemd-initctl.service
121122[::]:22          sshd.socket                 sshd.service
123kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
124
1255 sockets listed.</programlisting>
126            Note: because the addresses might contains spaces, this output
127            is not suitable for programmatic consumption.
128            </para>
129
130            <para>Also see <option>--show-types</option>, <option>--all</option>, and <option>--state=</option>.</para>
131          </listitem>
132        </varlistentry>
133
134        <varlistentry>
135          <term><command>list-timers</command> <optional><replaceable>PATTERN</replaceable>…</optional></term>
136
137          <listitem>
138            <para>List timer units currently in memory, ordered by the time they elapse next. If one or more
139            <replaceable>PATTERN</replaceable>s are specified, only units matching one of them are shown.
140            Produces output similar to
141            <programlisting>
142NEXT                         LEFT          LAST                         PASSED     UNIT                         ACTIVATES
143n/a                          n/a           Thu 2017-02-23 13:40:29 EST  3 days ago ureadahead-stop.timer        ureadahead-stop.service
144Sun 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
145Sun 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
146Sun 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
147            </programlisting>
148            </para>
149
150            <para><emphasis>NEXT</emphasis> shows the next time the timer will run.</para>
151            <para><emphasis>LEFT</emphasis> shows how long till the next time the timer runs.</para>
152            <para><emphasis>LAST</emphasis> shows the last time the timer ran.</para>
153            <para><emphasis>PASSED</emphasis> shows how long has passed since the timer last ran.</para>
154            <para><emphasis>UNIT</emphasis> shows the name of the timer</para>
155            <para><emphasis>ACTIVATES</emphasis> shows the name the service the timer activates when it runs.</para>
156
157            <para>Also see <option>--all</option> and <option>--state=</option>.</para>
158          </listitem>
159        </varlistentry>
160
161        <varlistentry>
162          <term><command>is-active <replaceable>PATTERN</replaceable>…</command></term>
163
164          <listitem>
165            <para>Check whether any of the specified units are active
166            (i.e. running). Returns an exit code
167            <constant>0</constant> if at least one is active, or
168            non-zero otherwise. Unless <option>--quiet</option> is
169            specified, this will also print the current unit state to
170            standard output.</para>
171          </listitem>
172        </varlistentry>
173
174        <varlistentry>
175          <term><command>is-failed <replaceable>PATTERN</replaceable>…</command></term>
176
177          <listitem>
178            <para>Check whether any of the specified units are in a
179            "failed" state. Returns an exit code
180            <constant>0</constant> if at least one has failed,
181            non-zero otherwise. Unless <option>--quiet</option> is
182            specified, this will also print the current unit state to
183            standard output.</para>
184          </listitem>
185        </varlistentry>
186
187        <varlistentry>
188          <term><command>status</command> <optional><replaceable>PATTERN</replaceable>…|<replaceable>PID</replaceable>…]</optional></term>
189
190          <listitem>
191            <para>Show terse runtime status information about one or
192            more units, followed by most recent log data from the
193            journal. If no units are specified, show system status. If
194            combined with <option>--all</option>, also show the status of
195            all units (subject to limitations specified with
196            <option>-t</option>). If a PID is passed, show information
197            about the unit the process belongs to.</para>
198
199            <para>This function is intended to generate human-readable
200            output. If you are looking for computer-parsable output,
201            use <command>show</command> instead. By default, this
202            function only shows 10 lines of output and ellipsizes
203            lines to fit in the terminal window. This can be changed
204            with <option>--lines</option> and <option>--full</option>,
205            see above. In addition, <command>journalctl
206            --unit=<replaceable>NAME</replaceable></command> or
207            <command>journalctl
208            --user-unit=<replaceable>NAME</replaceable></command> use
209            a similar filter for messages and might be more
210            convenient.
211            </para>
212
213            <para>systemd implicitly loads units as necessary, so just running the <command>status</command> will
214            attempt to load a file. The command is thus not useful for determining if something was already loaded or
215            not.  The units may possibly also be quickly unloaded after the operation is completed if there's no reason
216            to keep it in memory thereafter.
217            </para>
218
219            <example>
220              <title>Example output from systemctl status </title>
221
222              <programlisting>$ systemctl status bluetooth
223bluetooth.service - Bluetooth service
224   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
225   Active: active (running) since Wed 2017-01-04 13:54:04 EST; 1 weeks 0 days ago
226     Docs: man:bluetoothd(8)
227 Main PID: 930 (bluetoothd)
228   Status: "Running"
229    Tasks: 1
230   Memory: 648.0K
231      CPU: 435ms
232   CGroup: /system.slice/bluetooth.service
233           └─930 /usr/lib/bluetooth/bluetoothd
234
235Jan 12 10:46:45 example.com bluetoothd[8900]: Not enough free handles to register service
236Jan 12 10:46:45 example.com bluetoothd[8900]: Current Time Service could not be registered
237Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output error (5)
238</programlisting>
239
240            <para>The dot ("●") uses color on supported terminals to summarize the unit state at a glance. Along with
241            its color, its shape varies according to its state: <literal>inactive</literal> or
242            <literal>maintenance</literal> is a white circle ("○"), <literal>active</literal> is a green dot ("●"),
243            <literal>deactivating</literal> is a white dot, <literal>failed</literal> or <literal>error</literal> is
244            a red cross ("×"), and <literal>reloading</literal> is a green clockwise circle arrow ("↻").
245            </para>
246
247            <para>The "Loaded:" line in the output will show <literal>loaded</literal> if the unit has been loaded into
248            memory. Other possible values for "Loaded:" include: <literal>error</literal> if there was a problem
249            loading it, <literal>not-found</literal> if no unit file was found for this unit,
250            <literal>bad-setting</literal> if an essential unit file setting could not be parsed and
251            <literal>masked</literal> if the unit file has been masked. Along with showing the path to the unit file,
252            this line will also show the enablement state.  Enabled commands start at boot.  See the full table of
253            possible enablement states — including the definition of <literal>masked</literal> — in the documentation
254            for the <command>is-enabled</command> command.
255            </para>
256
257            <para>The "Active:" line shows active state.  The value is usually <literal>active</literal> or
258            <literal>inactive</literal>. Active could mean started, bound, plugged in, etc depending on the unit type.
259            The unit could also be in process of changing states, reporting a state of <literal>activating</literal> or
260            <literal>deactivating</literal>. A special <literal>failed</literal> state is entered when the service
261            failed in some way, such as a crash, exiting with an error code or timing out. If the failed state is
262            entered the cause will be logged for later reference.</para>
263            </example>
264
265          </listitem>
266        </varlistentry>
267
268        <varlistentry>
269          <term><command>show</command> <optional><replaceable>PATTERN</replaceable>…|<replaceable>JOB</replaceable>…</optional></term>
270
271          <listitem>
272            <para>Show properties of one or more units, jobs, or the manager itself. If no argument is specified,
273            properties of the manager will be shown. If a unit name is specified, properties of the unit are shown, and
274            if a job ID is specified, properties of the job are shown. By default, empty properties are suppressed. Use
275            <option>--all</option> to show those too. To select specific properties to show, use
276            <option>--property=</option>. This command is intended to be used whenever computer-parsable output is
277            required. Use <command>status</command> if you are looking for formatted human-readable output.</para>
278
279            <para>Many properties shown by <command>systemctl show</command> map directly to configuration settings of
280            the system and service manager and its unit files. Note that the properties shown by the command are
281            generally more low-level, normalized versions of the original configuration settings and expose runtime
282            state in addition to configuration. For example, properties shown for service units include the service's
283            current main process identifier as <literal>MainPID</literal> (which is runtime state), and time settings
284            are always exposed as properties ending in the <literal>…USec</literal> suffix even if a matching
285            configuration options end in <literal>…Sec</literal>, because microseconds is the normalized time unit used
286            internally by the system and service manager.</para>
287
288            <para>For details about many of these properties, see the documentation of the D-Bus interface
289            backing these properties, see
290            <citerefentry><refentrytitle>org.freedesktop.systemd1</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
291          </listitem>
292        </varlistentry>
293
294        <varlistentry>
295          <term><command>cat <replaceable>PATTERN</replaceable>…</command></term>
296
297          <listitem>
298            <para>Show backing files of one or more units. Prints the
299            "fragment" and "drop-ins" (source files) of units. Each
300            file is preceded by a comment which includes the file
301            name. Note that this shows the contents of the backing files
302            on disk, which may not match the system manager's
303            understanding of these units if any unit files were
304            updated on disk and the <command>daemon-reload</command>
305            command wasn't issued since.</para>
306          </listitem>
307        </varlistentry>
308
309        <varlistentry>
310          <term><command>help <replaceable>PATTERN</replaceable>…|<replaceable>PID</replaceable>…</command></term>
311
312          <listitem>
313            <para>Show manual pages for one or more units, if
314            available. If a PID is given, the manual pages for the unit
315            the process belongs to are shown.</para>
316          </listitem>
317        </varlistentry>
318
319        <varlistentry>
320          <term>
321            <command>list-dependencies</command>
322            <optional><replaceable>UNIT</replaceable>...</optional>
323          </term>
324
325          <listitem>
326            <para>Shows units required and wanted by the specified
327            units. This recursively lists units following the
328            <varname>Requires=</varname>,
329            <varname>Requisite=</varname>,
330            <varname>ConsistsOf=</varname>,
331            <varname>Wants=</varname>, <varname>BindsTo=</varname>
332            dependencies. If no units are specified,
333            <filename>default.target</filename> is implied.</para>
334
335            <para>By default, only target units are recursively
336            expanded. When <option>--all</option> is passed, all other
337            units are recursively expanded as well.</para>
338
339            <para>Options <option>--reverse</option>,
340            <option>--after</option>, <option>--before</option>
341            may be used to change what types of dependencies
342            are shown.</para>
343
344            <para>Note that this command only lists units currently loaded into memory by the service manager. In
345            particular, this command is not suitable to get a comprehensive list at all reverse dependencies on a
346            specific unit, as it won't list the dependencies declared by units currently not loaded.</para>
347          </listitem>
348        </varlistentry>
349
350        <!-- Commands that modify unit state start here -->
351
352        <varlistentry>
353          <term><command>start <replaceable>PATTERN</replaceable>…</command></term>
354
355          <listitem>
356            <para>Start (activate) one or more units specified on the command line.</para>
357
358            <para>Note that unit glob patterns expand to names of units currently in memory. Units which are
359            not active and are not in a failed state usually are not in memory, and will not be matched by
360            any pattern. In addition, in case of instantiated units, systemd is often unaware of the instance
361            name until the instance has been started. Therefore, using glob patterns with
362            <command>start</command> has limited usefulness. Also, secondary alias names of units are not
363            considered.</para>
364
365            <para>Option <option>--all</option> may be used to also operate on inactive units which are
366            referenced by other loaded units. Note that this is not the same as operating on "all" possible
367            units, because as the previous paragraph describes, such a list is ill-defined. Nevertheless,
368            <command>systemctl start --all <replaceable>GLOB</replaceable></command> may be useful if all the
369            units that should match the pattern are pulled in by some target which is known to be loaded.
370            </para>
371          </listitem>
372        </varlistentry>
373        <varlistentry>
374          <term><command>stop <replaceable>PATTERN</replaceable>…</command></term>
375
376          <listitem>
377            <para>Stop (deactivate) one or more units specified on the command line.</para>
378
379            <para>This command will fail if the unit does not exist or if stopping of the unit is prohibited (see
380            <varname>RefuseManualStop=</varname> in
381            <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
382            It will <emphasis>not</emphasis> fail if any of the commands configured to stop the unit
383            (<varname>ExecStop=</varname>, etc.) fail, because the manager will still forcibly terminate the
384            unit.</para>
385          </listitem>
386        </varlistentry>
387        <varlistentry>
388          <term><command>reload <replaceable>PATTERN</replaceable>…</command></term>
389
390          <listitem>
391            <para>Asks all units listed on the command line to reload
392            their configuration. Note that this will reload the
393            service-specific configuration, not the unit configuration
394            file of systemd. If you want systemd to reload the
395            configuration file of a unit, use the
396            <command>daemon-reload</command> command. In other words:
397            for the example case of Apache, this will reload Apache's
398            <filename>httpd.conf</filename> in the web server, not the
399            <filename>apache.service</filename> systemd unit
400            file.</para>
401
402            <para>This command should not be confused with the
403            <command>daemon-reload</command> command.</para>
404          </listitem>
405
406        </varlistentry>
407        <varlistentry>
408          <term><command>restart <replaceable>PATTERN</replaceable>…</command></term>
409
410          <listitem>
411            <para>Stop and then start one or more units specified on the command line. If the units are not running
412            yet, they will be started.</para>
413
414            <para>Note that restarting a unit with this command does not necessarily flush out all of the unit's
415            resources before it is started again. For example, the per-service file descriptor storage facility (see
416            <varname>FileDescriptorStoreMax=</varname> in
417            <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>) will
418            remain intact as long as the unit has a job pending, and is only cleared when the unit is fully stopped and
419            no jobs are pending anymore. If it is intended that the file descriptor store is flushed out, too, during a
420            restart operation an explicit <command>systemctl stop</command> command followed by <command>systemctl
421            start</command> should be issued.</para>
422          </listitem>
423        </varlistentry>
424        <varlistentry>
425          <term><command>try-restart <replaceable>PATTERN</replaceable>…</command></term>
426
427          <listitem>
428            <para>Stop and then start one or more units specified on the
429            command line if the units are running. This does nothing
430            if units are not running.</para>
431            <!-- Note that we don't document condrestart here, as that is just compatibility support, and we generally
432                 don't document that. -->
433          </listitem>
434        </varlistentry>
435        <varlistentry>
436          <term><command>reload-or-restart <replaceable>PATTERN</replaceable>…</command></term>
437
438          <listitem>
439            <para>Reload one or more units if they support it. If not, stop and then start them instead. If the units
440            are not running yet, they will be started.</para>
441          </listitem>
442        </varlistentry>
443        <varlistentry>
444          <term><command>try-reload-or-restart <replaceable>PATTERN</replaceable>…</command></term>
445
446          <listitem>
447            <para>Reload one or more units if they support it. If not, stop and then start them instead. This does
448            nothing if the units are not running.</para>
449            <!-- Note that we don't document force-reload here, as that is just compatibility support, and we generally
450                 don't document that. -->
451          </listitem>
452        </varlistentry>
453        <varlistentry>
454          <term><command>isolate <replaceable>UNIT</replaceable></command></term>
455
456          <listitem>
457            <para>Start the unit specified on the command line and its dependencies
458            and stop all others, unless they have
459            <option>IgnoreOnIsolate=yes</option> (see
460            <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
461            If a unit name with no extension is given, an extension of
462            <literal>.target</literal> will be assumed.</para>
463
464            <para>This command is dangerous, since it will immediately stop processes that are not enabled in
465            the new target, possibly including the graphical environment or terminal you are currently using.
466            </para>
467
468            <para>Note that this is allowed only on units where
469            <option>AllowIsolate=</option> is enabled. See
470            <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
471            for details.</para>
472          </listitem>
473        </varlistentry>
474        <varlistentry>
475          <term><command>kill <replaceable>PATTERN</replaceable>…</command></term>
476
477          <listitem>
478            <para>Send a signal to one or more processes of the
479            unit. Use <option>--kill-who=</option> to select which
480            process to kill. Use <option>--signal=</option> to select
481            the signal to send.</para>
482          </listitem>
483        </varlistentry>
484        <varlistentry>
485          <term><command>clean <replaceable>PATTERN</replaceable>…</command></term>
486
487          <listitem>
488            <para>Remove the configuration, state, cache, logs or runtime data of the specified units. Use
489            <option>--what=</option> to select which kind of resource to remove. For service units this may
490            be used to remove the directories configured with <varname>ConfigurationDirectory=</varname>,
491            <varname>StateDirectory=</varname>, <varname>CacheDirectory=</varname>,
492            <varname>LogsDirectory=</varname> and <varname>RuntimeDirectory=</varname>, see
493            <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
494            for details. For timer units this may be used to clear out the persistent timestamp data if
495            <varname>Persistent=</varname> is used and <option>--what=state</option> is selected, see
496            <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
497            command only applies to units that use either of these settings. If <option>--what=</option> is
498            not specified, both the cache and runtime data are removed (as these two types of data are
499            generally redundant and reproducible on the next invocation of the unit).</para>
500          </listitem>
501        </varlistentry>
502        <varlistentry>
503          <term><command>freeze <replaceable>PATTERN</replaceable>…</command></term>
504
505          <listitem>
506            <para>Freeze one or more units specified on the
507            command line using cgroup freezer</para>
508
509            <para>Freezing the unit will cause all processes contained within the cgroup corresponding to the unit
510            to be suspended. Being suspended means that unit's processes won't be scheduled to run on CPU until thawed.
511            Note that this command is supported only on systems that use unified cgroup hierarchy. Unit is automatically
512            thawed just before we execute a job against the unit, e.g. before the unit is stopped.</para>
513          </listitem>
514        </varlistentry>
515        <varlistentry>
516          <term><command>thaw <replaceable>PATTERN</replaceable>…</command></term>
517
518          <listitem>
519            <para>Thaw (unfreeze) one or more units specified on the
520            command line.</para>
521
522            <para>This is the inverse operation to the <command>freeze</command> command and resumes the execution of
523            processes in the unit's cgroup.</para>
524          </listitem>
525        </varlistentry>
526        <varlistentry>
527          <term><command>set-property <replaceable>UNIT</replaceable> <replaceable>PROPERTY</replaceable>=<replaceable>VALUE</replaceable>…</command></term>
528
529          <listitem>
530            <para>Set the specified unit properties at runtime where
531            this is supported. This allows changing configuration
532            parameter properties such as resource control settings at
533            runtime. Not all properties may be changed at runtime, but
534            many resource control settings (primarily those in
535            <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
536            may. The changes are applied immediately, and stored on disk
537            for future boots, unless <option>--runtime</option> is
538            passed, in which case the settings only apply until the
539            next reboot. The syntax of the property assignment follows
540            closely the syntax of assignments in unit files.</para>
541
542            <para>Example: <command>systemctl set-property foobar.service CPUWeight=200</command></para>
543
544            <para>If the specified unit appears to be inactive, the
545            changes will be only stored on disk as described
546            previously hence they will be effective when the unit will
547            be started.</para>
548
549            <para>Note that this command allows changing multiple properties at the same time, which is
550            preferable over setting them individually.</para>
551
552            <para>Example: <command>systemctl set-property foobar.service CPUWeight=200 MemoryMax=2G IPAccounting=yes</command></para>
553
554            <para>Like with unit file configuration settings, assigning an empty setting usually resets a
555            property to its defaults.</para>
556
557            <para>Example: <command>systemctl set-property avahi-daemon.service IPAddressDeny=</command></para>
558          </listitem>
559        </varlistentry>
560
561        <varlistentry>
562          <term>
563            <command>bind</command>
564            <replaceable>UNIT</replaceable>
565            <replaceable>PATH</replaceable>
566            [<replaceable>PATH</replaceable>]
567          </term>
568
569          <listitem><para>Bind-mounts a file or directory from the host into the specified unit's mount
570          namespace. The first path argument is the source file or directory on the host, the second path
571          argument is the destination file or directory in the unit's mount namespace. When the latter is
572          omitted, the destination path in the unit's mount namespace is the same as the source path on the
573          host. When combined with the <option>--read-only</option> switch, a ready-only bind mount is
574          created. When combined with the <option>--mkdir</option> switch, the destination path is first
575          created before the mount is applied.</para>
576
577          <para>Note that this option is currently only supported for units that run within a mount namespace
578          (e.g.: with <option>RootImage=</option>, <option>PrivateMounts=</option>, etc.). This command
579          supports bind-mounting directories, regular files, device nodes, <constant>AF_UNIX</constant>
580          socket nodes, as well as FIFOs.  The bind mount is ephemeral, and it is undone as soon as the
581          current unit process exists. Note that the namespace mentioned here, where the bind mount will be
582          added to, is the one where the main service process runs. Other processes (those exececuted by
583          <option>ExecReload=</option>, <option>ExecStartPre=</option>, etc.) run in distinct namespaces.
584          </para></listitem>
585        </varlistentry>
586
587        <varlistentry>
588          <term>
589            <command>mount-image</command>
590            <replaceable>UNIT</replaceable>
591            <replaceable>IMAGE</replaceable>
592            [<replaceable>PATH</replaceable>
593            [<replaceable>PARTITION_NAME</replaceable>:<replaceable>MOUNT_OPTIONS</replaceable>]]
594          </term>
595
596          <listitem><para>Mounts an image from the host into the specified unit's mount namespace. The first
597          path argument is the source image on the host, the second path argument is the destination
598          directory in the unit's mount namespace (i.e. inside
599          <option>RootImage=</option>/<option>RootDirectory=</option>). The following argument, if any, is
600          interpreted as a colon-separated tuple of partition name and comma-separated list of mount options
601          for that partition. The format is the same as the service <option>MountImages=</option>
602          setting. When combined with the <option>--read-only</option> switch, a ready-only mount is
603          created. When combined with the <option>--mkdir</option> switch, the destination path is first
604          created before the mount is applied.</para>
605
606          <para>Note that this option is currently only supported for units that run within a mount namespace
607          (i.e. with <option>RootImage=</option>, <option>PrivateMounts=</option>, etc.). Note that the
608          namespace mentioned here where the image mount will be added to, is the one where the main service
609          process runs. Note that the namespace mentioned here, where the bind mount will be
610          added to, is the one where the main service process runs. Other processes (those exececuted by
611          <option>ExecReload=</option>, <option>ExecStartPre=</option>, etc.) run in distinct namespaces.
612          </para>
613
614          <para>Example:
615          <programlisting>systemctl mount-image foo.service /tmp/img.raw /var/lib/image root:ro,nosuid</programlisting>
616          <programlisting>systemctl mount-image --mkdir bar.service /tmp/img.raw /var/lib/baz/img</programlisting>
617          </para></listitem>
618        </varlistentry>
619
620        <varlistentry>
621          <term><command>service-log-level</command> <replaceable>SERVICE</replaceable> [<replaceable>LEVEL</replaceable>]</term>
622
623          <listitem><para>If the <replaceable>LEVEL</replaceable> argument is not given, print the current
624          log level as reported by service <replaceable>SERVICE</replaceable>.</para>
625
626          <para>If the optional argument <replaceable>LEVEL</replaceable> is provided, then change the
627          current log level of the service to <replaceable>LEVEL</replaceable>. The log level should be a
628          typical syslog log level, i.e. a value in the range 0…7 or one of the strings
629          <constant>emerg</constant>, <constant>alert</constant>, <constant>crit</constant>,
630          <constant>err</constant>, <constant>warning</constant>, <constant>notice</constant>,
631          <constant>info</constant>, <constant>debug</constant>; see <citerefentry
632          project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
633          for details.</para>
634
635          <para>The service must have the appropriate
636          <varname>BusName=<replaceable>destination</replaceable></varname> property and also implement the
637          generic
638          <citerefentry><refentrytitle>org.freedesktop.LogControl1</refentrytitle><manvolnum>5</manvolnum></citerefentry>
639          interface. (<filename>systemctl</filename> will use the generic D-Bus protocol to access the
640          <interfacename>org.freedesktop.LogControl1.LogLevel</interfacename> interface for the D-Bus name
641          <replaceable>destination</replaceable>.)</para></listitem>
642        </varlistentry>
643
644        <varlistentry>
645          <term><command>service-log-target</command> <replaceable>SERVICE</replaceable> [<replaceable>TARGET</replaceable>]</term>
646
647          <listitem><para>If the <replaceable>TARGET</replaceable> argument is not given, print the current
648          log target as reported by service <replaceable>SERVICE</replaceable>.</para>
649
650          <para>If the optional argument <replaceable>TARGET</replaceable> is provided, then change the
651          current log target of the service to <replaceable>TARGET</replaceable>. The log target should be
652          one of the strings <constant>console</constant> (for log output to the service's standard error
653          stream), <constant>kmsg</constant> (for log output to the kernel log buffer),
654          <constant>journal</constant> (for log output to
655          <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
656          using the native journal protocol), <constant>syslog</constant> (for log output to the classic
657          syslog socket <filename>/dev/log</filename>), <constant>null</constant> (for no log output
658          whatsoever) or <constant>auto</constant> (for an automatically determined choice, typically
659          equivalent to <constant>console</constant> if the service is invoked interactively, and
660          <constant>journal</constant> or <constant>syslog</constant> otherwise).</para>
661
662          <para>For most services, only a small subset of log targets make sense. In particular, most
663          "normal" services should only implement <constant>console</constant>, <constant>journal</constant>,
664          and <constant>null</constant>. Anything else is only appropriate for low-level services that
665          are active in very early boot before proper logging is established.</para>
666
667          <para>The service must have the appropriate
668          <varname>BusName=<replaceable>destination</replaceable></varname> property and also implement the
669          generic
670          <citerefentry><refentrytitle>org.freedesktop.LogControl1</refentrytitle><manvolnum>5</manvolnum></citerefentry>
671          interface. (<filename>systemctl</filename> will use the generic D-Bus protocol to access the
672          <interfacename>org.freedesktop.LogControl1.LogLevel</interfacename> interface for the D-Bus name
673          <replaceable>destination</replaceable>.)</para></listitem>
674        </varlistentry>
675
676        <varlistentry>
677          <term><command>reset-failed [<replaceable>PATTERN</replaceable>…]</command></term>
678
679          <listitem>
680            <para>Reset the <literal>failed</literal> state of the specified units, or if no unit name is passed, reset
681            the state of all units. When a unit fails in some way (i.e. process exiting with non-zero error code,
682            terminating abnormally or timing out), it will automatically enter the <literal>failed</literal> state and
683            its exit code and status is recorded for introspection by the administrator until the service is
684            stopped/re-started or reset with this command.</para>
685
686            <para>In addition to resetting the <literal>failed</literal> state of a unit it also resets various other
687            per-unit properties: the start rate limit counter of all unit types is reset to zero, as is the restart
688            counter of service units. Thus, if a unit's start limit (as configured with
689            <varname>StartLimitIntervalSec=</varname>/<varname>StartLimitBurst=</varname>) is hit and the unit refuses
690            to be started again, use this command to make it startable again.</para>
691          </listitem>
692        </varlistentry>
693      </variablelist>
694    </refsect2>
695
696    <refsect2>
697      <title>Unit File Commands</title>
698
699      <variablelist>
700        <varlistentry>
701          <term><command>list-unit-files</command> <optional><replaceable>PATTERN…</replaceable></optional></term>
702
703          <listitem>
704            <para>List unit files installed on the system, in combination with their enablement state (as
705            reported by <command>is-enabled</command>). If one or more <replaceable>PATTERN</replaceable>s
706            are specified, only unit files whose name matches one of them are shown (patterns matching unit
707            file system paths are not supported).</para>
708
709            <para>Unlike <command>list-units</command> this command will list template units in addition to
710            explicitly instantiated units.</para>
711          </listitem>
712        </varlistentry>
713
714        <varlistentry>
715          <term><command>enable <replaceable>UNIT</replaceable>…</command></term>
716          <term><command>enable <replaceable>PATH</replaceable>…</command></term>
717
718          <listitem>
719            <para>Enable one or more units or unit instances. This will create a set of symlinks, as encoded in the
720            [Install] sections of the indicated unit files. After the symlinks have been created,
721            the system manager configuration is reloaded (in a way equivalent to <command>daemon-reload</command>), in
722            order to ensure the changes are taken into account immediately. Note that this does
723            <emphasis>not</emphasis> have the effect of also starting any of the units being enabled. If this is
724            desired, combine this command with the <option>--now</option> switch, or invoke <command>start</command>
725            with appropriate arguments later. Note that in case of unit instance enablement (i.e. enablement of units of
726            the form <filename>foo@bar.service</filename>), symlinks named the same as instances are created in the
727            unit configuration directory, however they point to the single template unit file they are instantiated
728            from.</para>
729
730            <para>This command expects either valid unit names (in which case various unit file directories are
731            automatically searched for unit files with appropriate names), or absolute paths to unit files (in which
732            case these files are read directly). If a specified unit file is located outside of the usual unit file
733            directories, an additional symlink is created, linking it into the unit configuration path, thus ensuring
734            it is found when requested by commands such as <command>start</command>. The file system where the linked
735            unit files are located must be accessible when systemd is started (e.g. anything underneath
736            <filename>/home/</filename> or <filename>/var/</filename> is not allowed, unless those directories are
737            located on the root file system).</para>
738
739            <para>This command will print the file system operations executed. This output may be suppressed by passing
740            <option>--quiet</option>.
741            </para>
742
743            <para>Note that this operation creates only the symlinks suggested in the [Install]
744            section of the unit files. While this command is the recommended way to manipulate the unit configuration
745            directory, the administrator is free to make additional changes manually by placing or removing symlinks
746            below this directory. This is particularly useful to create configurations that deviate from the suggested
747            default installation. In this case, the administrator must make sure to invoke
748            <command>daemon-reload</command> manually as necessary, in order to ensure the changes are taken into
749            account.
750            </para>
751
752            <para>Enabling units should not be confused with starting (activating) units, as done by the
753            <command>start</command> command. Enabling and starting units is orthogonal: units may be enabled without
754            being started and started without being enabled. Enabling simply hooks the unit into various suggested
755            places (for example, so that the unit is automatically started on boot or when a particular kind of
756            hardware is plugged in). Starting actually spawns the daemon process (in case of service units), or binds
757            the socket (in case of socket units), and so on.</para>
758
759            <para>Depending on whether <option>--system</option>, <option>--user</option>, <option>--runtime</option>,
760            or <option>--global</option> is specified, this enables the unit for the system, for the calling user only,
761            for only this boot of the system, or for all future logins of all users.  Note that in the last case, no
762            systemd daemon configuration is reloaded.</para>
763
764            <para>Using <command>enable</command> on masked units is not supported and results in an error.</para>
765          </listitem>
766        </varlistentry>
767
768        <varlistentry>
769          <term><command>disable <replaceable>UNIT</replaceable>…</command></term>
770
771          <listitem>
772            <para>Disables one or more units. This removes all symlinks to the unit files backing the specified units
773            from the unit configuration directory, and hence undoes any changes made by <command>enable</command> or
774            <command>link</command>. Note that this removes <emphasis>all</emphasis> symlinks to matching unit files,
775            including manually created symlinks, and not just those actually created by <command>enable</command> or
776            <command>link</command>. Note that while <command>disable</command> undoes the effect of
777            <command>enable</command>, the two commands are otherwise not symmetric, as <command>disable</command> may
778            remove more symlinks than a prior <command>enable</command> invocation of the same unit created.</para>
779
780            <para>This command expects valid unit names only, it does not accept paths to unit files.</para>
781
782            <para>In addition to the units specified as arguments, all units are disabled that are listed in the
783            <varname>Also=</varname> setting contained in the [Install] section of any of the unit
784            files being operated on.</para>
785
786            <para>This command implicitly reloads the system manager configuration after completing the operation. Note
787            that this command does not implicitly stop the units that are being disabled. If this is desired, either
788            combine this command with the <option>--now</option> switch, or invoke the <command>stop</command> command
789            with appropriate arguments later.</para>
790
791            <para>This command will print information about the file system operations (symlink removals)
792            executed. This output may be suppressed by passing <option>--quiet</option>.
793            </para>
794
795            <para>This command honors <option>--system</option>, <option>--user</option>, <option>--runtime</option>
796            and <option>--global</option> in a similar way as <command>enable</command>.</para>
797          </listitem>
798        </varlistentry>
799
800        <varlistentry>
801          <term><command>reenable <replaceable>UNIT</replaceable>…</command></term>
802
803          <listitem>
804            <para>Reenable one or more units, as specified on the command line. This is a combination of
805            <command>disable</command> and <command>enable</command> and is useful to reset the symlinks a unit file is
806            enabled with to the defaults configured in its [Install] section. This command expects
807            a unit name only, it does not accept paths to unit files.</para>
808          </listitem>
809        </varlistentry>
810
811        <varlistentry>
812          <term><command>preset <replaceable>UNIT</replaceable>…</command></term>
813
814          <listitem>
815            <para>Reset the enable/disable status one or more unit files, as specified on
816            the command line, to the defaults configured in the preset policy files. This
817            has the same effect as <command>disable</command> or
818            <command>enable</command>, depending how the unit is listed in the preset
819            files.</para>
820
821            <para>Use <option>--preset-mode=</option> to control whether units shall be
822            enabled and disabled, or only enabled, or only disabled.</para>
823
824            <para>If the unit carries no install information, it will be silently ignored
825            by this command. <replaceable>UNIT</replaceable> must be the real unit name,
826            any alias names are ignored silently.</para>
827
828            <para>For more information on the preset policy format, see
829            <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
830            </para>
831          </listitem>
832        </varlistentry>
833
834        <varlistentry>
835          <term><command>preset-all</command></term>
836
837          <listitem>
838            <para>Resets all installed unit files to the defaults
839            configured in the preset policy file (see above).</para>
840
841            <para>Use <option>--preset-mode=</option> to control
842            whether units shall be enabled and disabled, or only
843            enabled, or only disabled.</para>
844          </listitem>
845        </varlistentry>
846
847        <varlistentry>
848          <term><command>is-enabled <replaceable>UNIT</replaceable>…</command></term>
849
850          <listitem>
851            <para>Checks whether any of the specified unit files are
852            enabled (as with <command>enable</command>). Returns an
853            exit code of 0 if at least one is enabled, non-zero
854            otherwise. Prints the current enable status (see table).
855            To suppress this output, use <option>--quiet</option>.
856            To show installation targets, use <option>--full</option>.
857            </para>
858
859            <table>
860              <title>
861                <command>is-enabled</command> output
862              </title>
863
864              <tgroup cols='3'>
865                <thead>
866                  <row>
867                    <entry>Name</entry>
868                    <entry>Description</entry>
869                    <entry>Exit Code</entry>
870                  </row>
871                </thead>
872                <tbody>
873                  <row>
874                    <entry><literal>enabled</literal></entry>
875                    <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>
876                    <entry morerows='1'>0</entry>
877                  </row>
878                  <row>
879                    <entry><literal>enabled-runtime</literal></entry>
880                  </row>
881                  <row>
882                    <entry><literal>linked</literal></entry>
883                    <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>
884                    <entry morerows='1'>&gt; 0</entry>
885                  </row>
886                  <row>
887                    <entry><literal>linked-runtime</literal></entry>
888                  </row>
889                  <row>
890                    <entry><literal>alias</literal></entry>
891                    <entry>The name is an alias (symlink to another unit file).</entry>
892                    <entry>0</entry>
893                  </row>
894                  <row>
895                    <entry><literal>masked</literal></entry>
896                    <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>
897                    <entry morerows='1'>&gt; 0</entry>
898                  </row>
899                  <row>
900                    <entry><literal>masked-runtime</literal></entry>
901                  </row>
902                  <row>
903                    <entry><literal>static</literal></entry>
904                    <entry>The unit file is not enabled, and has no provisions for enabling in the [Install] unit file section.</entry>
905                    <entry>0</entry>
906                  </row>
907                  <row>
908                    <entry><literal>indirect</literal></entry>
909                    <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>
910                    <entry>0</entry>
911                  </row>
912                  <row>
913                    <entry><literal>disabled</literal></entry>
914                    <entry>The unit file is not enabled, but contains an [Install] section with installation instructions.</entry>
915                    <entry>&gt; 0</entry>
916                  </row>
917                  <row>
918                    <entry><literal>generated</literal></entry>
919                    <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>
920                    <entry>0</entry>
921                  </row>
922                  <row>
923                    <entry><literal>transient</literal></entry>
924                    <entry>The unit file has been created dynamically with the runtime API. Transient units may not be enabled.</entry>
925                    <entry>0</entry>
926                  </row>
927                  <row>
928                    <entry><literal>bad</literal></entry>
929                    <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>
930                    <entry>&gt; 0</entry>
931                  </row>
932                </tbody>
933              </tgroup>
934            </table>
935
936          </listitem>
937        </varlistentry>
938
939        <varlistentry>
940          <term><command>mask <replaceable>UNIT</replaceable>…</command></term>
941
942          <listitem>
943            <para>Mask one or more units, as specified on the command line. This will link these unit files to
944            <filename>/dev/null</filename>, making it impossible to start them. This is a stronger version of
945            <command>disable</command>, since it prohibits all kinds of activation of the unit, including enablement
946            and manual activation. Use this option with care. This honors the <option>--runtime</option> option to only
947            mask temporarily until the next reboot of the system. The <option>--now</option> option may be used to
948            ensure that the units are also stopped. This command expects valid unit names only, it does not accept unit
949            file paths.</para>
950          </listitem>
951        </varlistentry>
952
953        <varlistentry>
954          <term><command>unmask <replaceable>UNIT</replaceable>…</command></term>
955
956          <listitem>
957            <para>Unmask one or more unit files, as specified on the command line. This will undo the effect of
958            <command>mask</command>. This command expects valid unit names only, it does not accept unit file
959            paths.</para>
960          </listitem>
961        </varlistentry>
962
963        <varlistentry>
964          <term><command>link <replaceable>PATH</replaceable>…</command></term>
965
966          <listitem>
967            <para>Link a unit file that is not in the unit file search paths into the unit file search path. This
968            command expects an absolute path to a unit file. The effect of this may be undone with
969            <command>disable</command>. The effect of this command is that a unit file is made available for commands
970            such as <command>start</command>, even though it is not installed directly in the unit search path. The
971            file system where the linked unit files are located must be accessible when systemd is started
972            (e.g. anything underneath <filename>/home/</filename> or <filename>/var/</filename> is not allowed, unless
973            those directories are located on the root file system).</para>
974          </listitem>
975        </varlistentry>
976
977        <varlistentry>
978          <term><command>revert <replaceable>UNIT</replaceable>…</command></term>
979
980          <listitem>
981            <para>Revert one or more unit files to their vendor versions. This command removes drop-in configuration
982            files that modify the specified units, as well as any user-configured unit file that overrides a matching
983            vendor supplied unit file. Specifically, for a unit <literal>foo.service</literal> the matching directories
984            <literal>foo.service.d/</literal> with all their contained files are removed, both below the persistent and
985            runtime configuration directories (i.e. below <filename>/etc/systemd/system</filename> and
986            <filename>/run/systemd/system</filename>); if the unit file has a vendor-supplied version (i.e. a unit file
987            located below <filename>/usr/</filename>) any matching persistent or runtime unit file that overrides it is
988            removed, too. Note that if a unit file has no vendor-supplied version (i.e. is only defined below
989            <filename>/etc/systemd/system</filename> or <filename>/run/systemd/system</filename>, but not in a unit
990            file stored below <filename>/usr/</filename>), then it is not removed. Also, if a unit is masked, it is
991            unmasked.</para>
992
993            <para>Effectively, this command may be used to undo all changes made with <command>systemctl
994            edit</command>, <command>systemctl set-property</command> and <command>systemctl mask</command> and puts
995            the original unit file with its settings back in effect.</para>
996          </listitem>
997        </varlistentry>
998
999        <varlistentry>
1000          <term><command>add-wants <replaceable>TARGET</replaceable>
1001          <replaceable>UNIT</replaceable>…</command></term>
1002          <term><command>add-requires <replaceable>TARGET</replaceable>
1003          <replaceable>UNIT</replaceable>…</command></term>
1004
1005          <listitem>
1006            <para>Adds <literal>Wants=</literal> or <literal>Requires=</literal>
1007            dependencies, respectively, to the specified
1008            <replaceable>TARGET</replaceable> for one or more units. </para>
1009
1010            <para>This command honors <option>--system</option>,
1011            <option>--user</option>, <option>--runtime</option> and
1012            <option>--global</option> in a way similar to
1013            <command>enable</command>.</para>
1014
1015          </listitem>
1016        </varlistentry>
1017
1018        <varlistentry>
1019          <term><command>edit <replaceable>UNIT</replaceable>…</command></term>
1020
1021          <listitem>
1022            <para>Edit a drop-in snippet or a whole replacement file if
1023            <option>--full</option> is specified, to extend or override the
1024            specified unit.</para>
1025
1026            <para>Depending on whether <option>--system</option> (the default),
1027            <option>--user</option>, or <option>--global</option> is specified,
1028            this command creates a drop-in file for each unit either for the system,
1029            for the calling user, or for all futures logins of all users. Then,
1030            the editor (see the "Environment" section below) is invoked on
1031            temporary files which will be written to the real location if the
1032            editor exits successfully.</para>
1033
1034            <para>If <option>--full</option> is specified, this will copy the
1035            original units instead of creating drop-in files.</para>
1036
1037            <para>If <option>--force</option> is specified and any units do
1038            not already exist, new unit files will be opened for editing.</para>
1039
1040            <para>If <option>--runtime</option> is specified, the changes will
1041            be made temporarily in <filename>/run/</filename> and they will be
1042            lost on the next reboot.</para>
1043
1044            <para>If the temporary file is empty upon exit, the modification of
1045            the related unit is canceled.</para>
1046
1047            <para>After the units have been edited, systemd configuration is
1048            reloaded (in a way that is equivalent to <command>daemon-reload</command>).
1049            </para>
1050
1051            <para>Note that this command cannot be used to remotely edit units
1052            and that you cannot temporarily edit units which are in
1053            <filename>/etc/</filename>, since they take precedence over
1054            <filename>/run/</filename>.</para>
1055          </listitem>
1056        </varlistentry>
1057
1058        <varlistentry>
1059          <term><command>get-default</command></term>
1060
1061          <listitem>
1062            <para>Return the default target to boot into. This returns
1063            the target unit name <filename>default.target</filename>
1064            is aliased (symlinked) to.</para>
1065          </listitem>
1066        </varlistentry>
1067
1068        <varlistentry>
1069          <term><command>set-default <replaceable>TARGET</replaceable></command></term>
1070
1071          <listitem>
1072            <para>Set the default target to boot into. This sets
1073            (symlinks) the <filename>default.target</filename> alias
1074            to the given target unit.</para>
1075          </listitem>
1076        </varlistentry>
1077
1078      </variablelist>
1079    </refsect2>
1080
1081    <refsect2>
1082      <title>Machine Commands</title>
1083
1084      <variablelist>
1085        <varlistentry>
1086          <term><command>list-machines</command> <optional><replaceable>PATTERN</replaceable>…</optional></term>
1087
1088          <listitem>
1089            <para>List the host and all running local containers with
1090            their state. If one or more
1091            <replaceable>PATTERN</replaceable>s are specified, only
1092            containers matching one of them are shown.
1093            </para>
1094          </listitem>
1095        </varlistentry>
1096      </variablelist>
1097    </refsect2>
1098
1099    <refsect2>
1100      <title>Job Commands</title>
1101
1102      <variablelist>
1103        <varlistentry>
1104          <term><command>list-jobs <optional><replaceable>PATTERN…</replaceable></optional></command></term>
1105
1106          <listitem>
1107            <para>List jobs that are in progress. If one or more
1108            <replaceable>PATTERN</replaceable>s are specified, only
1109            jobs for units matching one of them are shown.</para>
1110
1111            <para>When combined with <option>--after</option> or <option>--before</option> the list is augmented with
1112            information on which other job each job is waiting for, and which other jobs are waiting for it, see
1113            above.</para>
1114          </listitem>
1115        </varlistentry>
1116        <varlistentry>
1117          <term><command>cancel <replaceable>JOB</replaceable>…</command></term>
1118
1119          <listitem>
1120            <para>Cancel one or more jobs specified on the command line
1121            by their numeric job IDs. If no job ID is specified, cancel
1122            all pending jobs.</para>
1123          </listitem>
1124        </varlistentry>
1125      </variablelist>
1126    </refsect2>
1127
1128    <refsect2>
1129      <title>Environment Commands</title>
1130
1131      <para><command>systemd</command> supports an environment block that is passed to processes the manager
1132      spawns. The names of the variables can contain ASCII letters, digits, and the underscore
1133      character. Variable names cannot be empty or start with a digit. In variable values, most characters
1134      are allowed, but the whole sequence must be valid UTF-8. (Note that control characters like newline
1135      (<constant>NL</constant>), tab (<constant>TAB</constant>), or the escape character
1136      (<constant>ESC</constant>), <emphasis>are</emphasis> valid ASCII and thus valid UTF-8). The total
1137      length of the environment block is limited to <constant>_SC_ARG_MAX</constant> value defined by
1138      <citerefentry project='man-pages'><refentrytitle>sysconf</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
1139      </para>
1140
1141      <variablelist>
1142        <varlistentry>
1143          <term><command>show-environment</command></term>
1144
1145          <listitem>
1146            <para>Dump the systemd manager environment block. This is the environment
1147            block that is passed to all processes the manager spawns. The environment
1148            block will be dumped in straightforward form suitable for sourcing into
1149            most shells. If no special characters or whitespace is present in the variable
1150            values, no escaping is performed, and the assignments have the form
1151            <literal>VARIABLE=value</literal>. If whitespace or characters which have
1152            special meaning to the shell are present, dollar-single-quote escaping is
1153            used, and assignments have the form <literal>VARIABLE=$'value'</literal>.
1154            This syntax is known to be supported by
1155            <citerefentry project='die-net'><refentrytitle>bash</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1156            <citerefentry project='die-net'><refentrytitle>zsh</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1157            <citerefentry project='die-net'><refentrytitle>ksh</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1158            and
1159            <citerefentry project='die-net'><refentrytitle>busybox</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
1160            <citerefentry project='die-net'><refentrytitle>ash</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1161            but not
1162            <citerefentry project='die-net'><refentrytitle>dash</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1163            or
1164            <citerefentry project='die-net'><refentrytitle>fish</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
1165            </para>
1166          </listitem>
1167        </varlistentry>
1168        <varlistentry>
1169          <term><command>set-environment <replaceable>VARIABLE=VALUE</replaceable>…</command></term>
1170
1171          <listitem>
1172            <para>Set one or more systemd manager environment variables, as specified on the command
1173            line. This command will fail if variable names and values do not conform to the rules listed
1174            above.</para>
1175          </listitem>
1176        </varlistentry>
1177        <varlistentry>
1178          <term><command>unset-environment <replaceable>VARIABLE</replaceable>…</command></term>
1179
1180          <listitem>
1181            <para>Unset one or more systemd manager environment
1182            variables. If only a variable name is specified, it will be
1183            removed regardless of its value. If a variable and a value
1184            are specified, the variable is only removed if it has the
1185            specified value.</para>
1186          </listitem>
1187        </varlistentry>
1188        <varlistentry>
1189          <term>
1190            <command>import-environment</command>
1191            <replaceable>VARIABLE…</replaceable>
1192          </term>
1193
1194          <listitem>
1195            <para>Import all, one or more environment variables set on the client into the systemd manager
1196            environment block. If a list of environment variable names is passed, client-side values are then
1197            imported into the manager's environment block. If any names are not valid environment variable
1198            names or have invalid values according to the rules described above, an error is raised. If no
1199            arguments are passed, the entire environment block inherited by the <command>systemctl</command>
1200            process is imported. In this mode, any inherited invalid environment variables are quietly
1201            ignored.</para>
1202
1203            <para>Importing of the full inherited environment block (calling this command without any
1204            arguments) is deprecated. A shell will set dozens of variables which only make sense locally and
1205            are only meant for processes which are descendants of the shell. Such variables in the global
1206            environment block are confusing to other processes.</para>
1207          </listitem>
1208        </varlistentry>
1209      </variablelist>
1210    </refsect2>
1211
1212    <refsect2>
1213      <title>Manager State Commands</title>
1214
1215      <variablelist>
1216        <varlistentry>
1217          <term><command>daemon-reload</command></term>
1218
1219          <listitem>
1220            <para>Reload the systemd manager configuration. This will
1221            rerun all generators (see
1222            <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
1223            reload all unit files, and recreate the entire dependency
1224            tree. While the daemon is being reloaded, all sockets
1225            systemd listens on behalf of user configuration will stay
1226            accessible.</para>
1227
1228            <para>This command should not be confused with the
1229            <command>reload</command> command.</para>
1230          </listitem>
1231        </varlistentry>
1232
1233        <varlistentry>
1234          <term><command>daemon-reexec</command></term>
1235
1236          <listitem>
1237            <para>Reexecute the systemd manager. This will serialize the
1238            manager state, reexecute the process and deserialize the
1239            state again. This command is of little use except for
1240            debugging and package upgrades. Sometimes, it might be
1241            helpful as a heavy-weight <command>daemon-reload</command>.
1242            While the daemon is being reexecuted, all sockets systemd listening
1243            on behalf of user configuration will stay accessible.
1244            </para>
1245          </listitem>
1246        </varlistentry>
1247
1248        <varlistentry id='log-level'>
1249          <term><command>log-level</command> [<replaceable>LEVEL</replaceable>]</term>
1250
1251          <listitem><para>If no argument is given, print the current log level of the manager. If an
1252          optional argument <replaceable>LEVEL</replaceable> is provided, then the command changes the
1253          current log level of the manager to <replaceable>LEVEL</replaceable> (accepts the same values as
1254          <option>--log-level=</option> described in
1255          <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
1256          </para></listitem>
1257        </varlistentry>
1258
1259        <varlistentry>
1260          <term><command>log-target</command> [<replaceable>TARGET</replaceable>]</term>
1261
1262          <listitem><para>If no argument is given, print the current log target of the manager. If an
1263          optional argument <replaceable>TARGET</replaceable> is provided, then the command changes the
1264          current log target of the manager to <replaceable>TARGET</replaceable> (accepts the same values as
1265          <option>--log-target=</option>, described in
1266          <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
1267          </para></listitem>
1268        </varlistentry>
1269
1270        <varlistentry>
1271          <term><command>service-watchdogs</command> [yes|no]</term>
1272
1273          <listitem><para>If no argument is given, print the current state of service runtime watchdogs of
1274          the manager. If an optional boolean argument is provided, then globally enables or disables the
1275          service runtime watchdogs (<option>WatchdogSec=</option>) and emergency actions (e.g.
1276          <option>OnFailure=</option> or <option>StartLimitAction=</option>); see
1277          <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
1278          The hardware watchdog is not affected by this setting.</para></listitem>
1279        </varlistentry>
1280      </variablelist>
1281    </refsect2>
1282
1283    <refsect2>
1284      <title>System Commands</title>
1285
1286      <variablelist>
1287        <varlistentry>
1288          <term><command>is-system-running</command></term>
1289
1290          <listitem>
1291            <para>Checks whether the system is operational. This
1292            returns success (exit code 0) when the system is fully up
1293            and running, specifically not in startup, shutdown or
1294            maintenance mode, and with no failed services. Failure is
1295            returned otherwise (exit code non-zero). In addition, the
1296            current state is printed in a short string to standard
1297            output, see the table below. Use <option>--quiet</option> to
1298            suppress this output.</para>
1299
1300            <para>Use <option>--wait</option> to wait until the boot
1301            process is completed before printing the current state and
1302            returning the appropriate error status. If <option>--wait</option>
1303            is in use, states <varname>initializing</varname> or
1304            <varname>starting</varname> will not be reported, instead
1305            the command will block until a later state (such as
1306            <varname>running</varname> or <varname>degraded</varname>)
1307            is reached.</para>
1308
1309            <table>
1310              <title><command>is-system-running</command> output</title>
1311              <tgroup cols='3'>
1312                <colspec colname='name'/>
1313                <colspec colname='description'/>
1314                <colspec colname='exit-code'/>
1315                <thead>
1316                  <row>
1317                    <entry>Name</entry>
1318                    <entry>Description</entry>
1319                    <entry>Exit Code</entry>
1320                  </row>
1321                </thead>
1322                <tbody>
1323                  <row>
1324                    <entry><varname>initializing</varname></entry>
1325                    <entry><para>Early bootup, before
1326                    <filename>basic.target</filename> is reached
1327                    or the <varname>maintenance</varname> state entered.
1328                    </para></entry>
1329                    <entry>&gt; 0</entry>
1330                  </row>
1331                  <row>
1332                    <entry><varname>starting</varname></entry>
1333                    <entry><para>Late bootup, before the job queue
1334                    becomes idle for the first time, or one of the
1335                    rescue targets are reached.</para></entry>
1336                    <entry>&gt; 0</entry>
1337                  </row>
1338                  <row>
1339                    <entry><varname>running</varname></entry>
1340                    <entry><para>The system is fully
1341                    operational.</para></entry>
1342                    <entry>0</entry>
1343                  </row>
1344                  <row>
1345                    <entry><varname>degraded</varname></entry>
1346                    <entry><para>The system is operational but one or more
1347                    units failed.</para></entry>
1348                    <entry>&gt; 0</entry>
1349                  </row>
1350                  <row>
1351                    <entry><varname>maintenance</varname></entry>
1352                    <entry><para>The rescue or emergency target is
1353                    active.</para></entry>
1354                    <entry>&gt; 0</entry>
1355                  </row>
1356                  <row>
1357                    <entry><varname>stopping</varname></entry>
1358                    <entry><para>The manager is shutting
1359                    down.</para></entry>
1360                    <entry>&gt; 0</entry>
1361                  </row>
1362                  <row>
1363                    <entry><varname>offline</varname></entry>
1364                    <entry><para>The manager is not
1365                    running. Specifically, this is the operational
1366                    state if an incompatible program is running as
1367                    system manager (PID 1).</para></entry>
1368                    <entry>&gt; 0</entry>
1369                  </row>
1370                  <row>
1371                    <entry><varname>unknown</varname></entry>
1372                    <entry><para>The operational state could not be
1373                    determined, due to lack of resources or another
1374                    error cause.</para></entry>
1375                    <entry>&gt; 0</entry>
1376                  </row>
1377                </tbody>
1378              </tgroup>
1379            </table>
1380          </listitem>
1381        </varlistentry>
1382
1383        <varlistentry>
1384          <term><command>default</command></term>
1385
1386          <listitem>
1387            <para>Enter default mode. This is equivalent to <command>systemctl isolate default.target</command>. This
1388            operation is blocking by default, use <option>--no-block</option> to request asynchronous behavior.</para>
1389          </listitem>
1390        </varlistentry>
1391
1392        <varlistentry>
1393          <term><command>rescue</command></term>
1394
1395          <listitem>
1396            <para>Enter rescue mode. This is equivalent to <command>systemctl isolate rescue.target</command>. This
1397            operation is blocking by default, use <option>--no-block</option> to request asynchronous behavior.</para>
1398          </listitem>
1399        </varlistentry>
1400        <varlistentry>
1401          <term><command>emergency</command></term>
1402
1403          <listitem>
1404            <para>Enter emergency mode. This is equivalent to <command>systemctl isolate
1405            emergency.target</command>. This operation is blocking by default, use <option>--no-block</option> to
1406            request asynchronous behavior.</para>
1407          </listitem>
1408        </varlistentry>
1409        <varlistentry>
1410          <term><command>halt</command></term>
1411
1412          <listitem>
1413            <para>Shut down and halt the system. This is mostly equivalent to <command>systemctl start halt.target
1414            --job-mode=replace-irreversibly --no-block</command>, but also prints a wall message to all users. This command is
1415            asynchronous; it will return after the halt operation is enqueued, without waiting for it to complete. Note
1416            that this operation will simply halt the OS kernel after shutting down, leaving the hardware powered
1417            on. Use <command>systemctl poweroff</command> for powering off the system (see below).</para>
1418
1419            <para>If combined with <option>--force</option>, shutdown of all running services is skipped, however all
1420            processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the
1421            system halt.  If <option>--force</option> is specified twice, the operation is immediately executed without
1422            terminating any processes or unmounting any file systems. This may result in data loss. Note that when
1423            <option>--force</option> is specified twice the halt operation is executed by <command>systemctl</command>
1424            itself, and the system manager is not contacted. This means the command should succeed even when the system
1425            manager has crashed.</para>
1426          </listitem>
1427        </varlistentry>
1428        <varlistentry>
1429          <term><command>poweroff</command></term>
1430
1431          <listitem>
1432            <para>Shut down and power-off the system. This is mostly equivalent to <command>systemctl start
1433            poweroff.target --job-mode=replace-irreversibly --no-block</command>, but also prints a wall message to all
1434            users. This command is asynchronous; it will return after the power-off operation is enqueued, without
1435            waiting for it to complete.</para>
1436
1437            <para>If combined with <option>--force</option>, shutdown of all running services is skipped, however all
1438            processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the
1439            powering off. If <option>--force</option> is specified twice, the operation is immediately executed without
1440            terminating any processes or unmounting any file systems. This may result in data loss. Note that when
1441            <option>--force</option> is specified twice the power-off operation is executed by
1442            <command>systemctl</command> itself, and the system manager is not contacted. This means the command should
1443            succeed even when the system manager has crashed.</para>
1444          </listitem>
1445        </varlistentry>
1446        <varlistentry>
1447          <term><command>reboot</command></term>
1448
1449          <listitem>
1450            <para>Shut down and reboot the system.</para>
1451
1452            <para>This command mostly equivalent to <command>systemctl start reboot.target
1453            --job-mode=replace-irreversibly --no-block</command>, but also prints a wall message to all
1454            users. This command is asynchronous; it will return after the reboot operation is enqueued,
1455            without waiting for it to complete.</para>
1456
1457            <para>If combined with <option>--force</option>, shutdown of all running services is skipped, however all
1458            processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the
1459            reboot. If <option>--force</option> is specified twice, the operation is immediately executed without
1460            terminating any processes or unmounting any file systems. This may result in data loss. Note that when
1461            <option>--force</option> is specified twice the reboot operation is executed by
1462            <command>systemctl</command> itself, and the system manager is not contacted. This means the command should
1463            succeed even when the system manager has crashed.</para>
1464
1465            <para>If the switch <option>--reboot-argument=</option> is given, it will be passed as the optional
1466            argument to the <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
1467            system call.</para>
1468
1469            <para>Options <option>--boot-loader-entry=</option>, <option>--boot-loader-menu=</option>, and
1470            <option>--firmware-setup</option> can be used to select what to do <emphasis>after</emphasis> the
1471            reboot. See the descriptions of those options for details.</para>
1472          </listitem>
1473        </varlistentry>
1474
1475        <varlistentry>
1476          <term><command>kexec</command></term>
1477
1478          <listitem>
1479            <para>Shut down and reboot the system via <command>kexec</command>. This is equivalent to
1480            <command>systemctl start kexec.target --job-mode=replace-irreversibly --no-block</command>. This command is
1481            asynchronous; it will return after the reboot operation is enqueued, without waiting for it to
1482            complete.</para>
1483
1484            <para>If combined with <option>--force</option>, shutdown of all running services is skipped, however all
1485            processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the
1486            reboot.</para>
1487          </listitem>
1488        </varlistentry>
1489
1490        <varlistentry>
1491          <term><command>exit</command> <optional><replaceable>EXIT_CODE</replaceable></optional></term>
1492
1493          <listitem>
1494            <para>Ask the service manager to quit. This is only supported for user service managers (i.e. in
1495            conjunction with the <option>--user</option> option) or in containers and is equivalent to
1496            <command>poweroff</command> otherwise. This command is asynchronous; it will return after the exit
1497            operation is enqueued, without waiting for it to complete.</para>
1498
1499            <para>The service manager will exit with the specified exit code, if
1500            <replaceable>EXIT_CODE</replaceable> is passed.</para>
1501          </listitem>
1502        </varlistentry>
1503
1504        <varlistentry>
1505          <term><command>switch-root</command> <replaceable>ROOT</replaceable> <optional><replaceable>INIT</replaceable></optional></term>
1506
1507          <listitem>
1508            <para>Switches to a different root directory and executes a new system manager process below it. This is
1509            intended for usage in initial RAM disks ("initrd"), and will transition from the initrd's system manager
1510            process (a.k.a. "init" process) to the main system manager process which is loaded from the actual host
1511            volume. This call takes two arguments: the directory that is to become the new root directory, and the path
1512            to the new system manager binary below it to execute as PID 1. If the latter is omitted or the empty
1513            string, a systemd binary will automatically be searched for and used as init. If the system manager path is
1514            omitted, equal to the empty string or identical to the path to the systemd binary, the state of the
1515            initrd's system manager process is passed to the main system manager, which allows later introspection of
1516            the state of the services involved in the initrd boot phase.</para>
1517          </listitem>
1518        </varlistentry>
1519
1520        <varlistentry>
1521          <term><command>suspend</command></term>
1522
1523          <listitem>
1524            <para>Suspend the system. This will trigger activation of the special target unit
1525            <filename>suspend.target</filename>. This command is asynchronous, and will return after the suspend
1526            operation is successfully enqueued. It will not wait for the suspend/resume cycle to complete.</para>
1527          </listitem>
1528        </varlistentry>
1529
1530        <varlistentry>
1531          <term><command>hibernate</command></term>
1532
1533          <listitem>
1534            <para>Hibernate the system. This will trigger activation of the special target unit
1535            <filename>hibernate.target</filename>. This command is asynchronous, and will return after the hibernation
1536            operation is successfully enqueued. It will not wait for the hibernate/thaw cycle to complete.</para>
1537          </listitem>
1538        </varlistentry>
1539
1540        <varlistentry>
1541          <term><command>hybrid-sleep</command></term>
1542
1543          <listitem>
1544            <para>Hibernate and suspend the system. This will trigger activation of the special target unit
1545            <filename>hybrid-sleep.target</filename>. This command is asynchronous, and will return after the hybrid
1546            sleep operation is successfully enqueued. It will not wait for the sleep/wake-up cycle to complete.</para>
1547          </listitem>
1548        </varlistentry>
1549
1550        <varlistentry>
1551          <term><command>suspend-then-hibernate</command></term>
1552
1553          <listitem>
1554            <para>Suspend the system and hibernate it after the delay specified in <filename>systemd-sleep.conf</filename>.
1555            This will trigger activation of the special target unit <filename>suspend-then-hibernate.target</filename>.
1556            This command is asynchronous, and will return after the hybrid sleep operation is successfully enqueued.
1557            It will not wait for the sleep/wake-up or hibernate/thaw cycle to complete.</para>
1558          </listitem>
1559        </varlistentry>
1560      </variablelist>
1561    </refsect2>
1562
1563    <refsect2>
1564      <title>Parameter Syntax</title>
1565
1566      <para>Unit commands listed above take either a single unit name (designated as <replaceable>UNIT</replaceable>),
1567      or multiple unit specifications (designated as <replaceable>PATTERN</replaceable>…). In the first case, the
1568      unit name with or without a suffix must be given. If the suffix is not specified (unit name is "abbreviated"),
1569      systemctl will append a suitable suffix, <literal>.service</literal> by default, and a type-specific suffix in
1570      case of commands which operate only on specific unit types. For example,
1571      <programlisting># systemctl start sshd</programlisting> and
1572      <programlisting># systemctl start sshd.service</programlisting>
1573      are equivalent, as are
1574      <programlisting># systemctl isolate default</programlisting>
1575      and
1576      <programlisting># systemctl isolate default.target</programlisting>
1577      Note that (absolute) paths to device nodes are automatically converted to device unit names, and other (absolute)
1578      paths to mount unit names.
1579      <programlisting># systemctl status /dev/sda
1580# systemctl status /home</programlisting>
1581      are equivalent to:
1582      <programlisting># systemctl status dev-sda.device
1583# systemctl status home.mount</programlisting>
1584      In the second case, shell-style globs will be matched against the primary names of all units currently in memory;
1585      literal unit names, with or without a suffix, will be treated as in the first case. This means that literal unit
1586      names always refer to exactly one unit, but globs may match zero units and this is not considered an
1587      error.</para>
1588
1589      <para>Glob patterns use
1590      <citerefentry project='man-pages'><refentrytitle>fnmatch</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1591      so normal shell-style globbing rules are used, and
1592      <literal>*</literal>, <literal>?</literal>,
1593      <literal>[]</literal> may be used. See
1594      <citerefentry project='man-pages'><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1595      for more details. The patterns are matched against the primary names of
1596      units currently in memory, and patterns which do not match anything
1597      are silently skipped. For example:
1598      <programlisting># systemctl stop sshd@*.service</programlisting>
1599      will stop all <filename>sshd@.service</filename> instances. Note that alias names of units, and units that aren't
1600      in memory are not considered for glob expansion.
1601      </para>
1602
1603      <para>For unit file commands, the specified <replaceable>UNIT</replaceable> should be the name of the unit file
1604      (possibly abbreviated, see above), or the absolute path to the unit file:
1605      <programlisting># systemctl enable foo.service</programlisting>
1606      or
1607      <programlisting># systemctl link /path/to/foo.service</programlisting>
1608      </para>
1609    </refsect2>
1610
1611  </refsect1>
1612
1613  <refsect1>
1614    <title>Options</title>
1615
1616    <para>The following options are understood:</para>
1617
1618    <variablelist>
1619      <varlistentry>
1620        <term><option>-t</option></term>
1621        <term><option>--type=</option></term>
1622
1623        <listitem>
1624          <para>The argument should be a comma-separated list of unit
1625          types such as <option>service</option> and
1626          <option>socket</option>.
1627          </para>
1628
1629          <para>If one of the arguments is a unit type, when listing
1630          units, limit display to certain unit types. Otherwise, units
1631          of all types will be shown.</para>
1632
1633          <para>As a special case, if one of the arguments is
1634          <option>help</option>, a list of allowed values will be
1635          printed and the program will exit.</para>
1636        </listitem>
1637      </varlistentry>
1638
1639      <varlistentry>
1640        <term><option>--state=</option></term>
1641
1642        <listitem>
1643          <para>The argument should be a comma-separated list of unit
1644          LOAD, SUB, or ACTIVE states. When listing units, show only
1645          those in the specified states. Use <option>--state=failed</option>
1646          to show only failed units.</para>
1647
1648          <para>As a special case, if one of the arguments is
1649          <option>help</option>, a list of allowed values will be
1650          printed and the program will exit.</para>
1651        </listitem>
1652      </varlistentry>
1653
1654      <varlistentry>
1655        <term><option>-p</option></term>
1656        <term><option>--property=</option></term>
1657
1658        <listitem>
1659          <para>When showing unit/job/manager properties with the
1660          <command>show</command> command, limit display to properties
1661          specified in the argument. The argument should be a
1662          comma-separated list of property names, such as
1663          <literal>MainPID</literal>. Unless specified, all known
1664          properties are shown. If specified more than once, all
1665          properties with the specified names are shown. Shell
1666          completion is implemented for property names.</para>
1667
1668          <para>For the manager itself,
1669          <command>systemctl show</command>
1670          will show all available properties, most of which are derived or closely match the options described in
1671          <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
1672          </para>
1673
1674          <para>Properties for units vary by unit type, so showing any
1675          unit (even a non-existent one) is a way to list properties
1676          pertaining to this type. Similarly, showing any job will list
1677          properties pertaining to all jobs. Properties for units are
1678          documented in
1679          <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1680          and the pages for individual unit types
1681          <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1682          <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1683          etc.</para>
1684        </listitem>
1685      </varlistentry>
1686
1687      <varlistentry>
1688        <term><option>-P</option></term>
1689
1690        <listitem>
1691          <para>Equivalent to <option>--value</option> <option>--property=</option>, i.e. shows the
1692          value of the property without the property name or <literal>=</literal>. Note that using
1693          <option>-P</option> once will also affect all properties listed with
1694          <option>-p</option>/<option>--property=</option>.</para>
1695        </listitem>
1696      </varlistentry>
1697
1698      <varlistentry>
1699        <term><option>-a</option></term>
1700        <term><option>--all</option></term>
1701
1702        <listitem>
1703          <para>When listing units with <command>list-units</command>, also show inactive units and
1704          units which are following other units. When showing unit/job/manager properties, show all
1705          properties regardless whether they are set or not.</para>
1706
1707          <para>To list all units installed in the file system, use the
1708          <command>list-unit-files</command> command instead.</para>
1709
1710          <para>When listing units with <command>list-dependencies</command>, recursively show
1711          dependencies of all dependent units (by default only dependencies of target units are
1712          shown).</para>
1713
1714          <para>When used with <command>status</command>, show journal messages in full, even if they include
1715          unprintable characters or are very long. By default, fields with unprintable characters are
1716          abbreviated as "blob data". (Note that the pager may escape unprintable characters again.)</para>
1717        </listitem>
1718      </varlistentry>
1719
1720      <varlistentry>
1721        <term><option>-r</option></term>
1722        <term><option>--recursive</option></term>
1723
1724        <listitem>
1725          <para>When listing units, also show units of local
1726          containers. Units of local containers will be prefixed with
1727          the container name, separated by a single colon character
1728          (<literal>:</literal>).</para>
1729        </listitem>
1730      </varlistentry>
1731
1732      <varlistentry>
1733        <term><option>--reverse</option></term>
1734
1735        <listitem>
1736          <para>Show reverse dependencies between units with
1737          <command>list-dependencies</command>, i.e. follow
1738          dependencies of type <varname>WantedBy=</varname>,
1739          <varname>RequiredBy=</varname>,
1740          <varname>PartOf=</varname>, <varname>BoundBy=</varname>,
1741          instead of <varname>Wants=</varname> and similar.
1742          </para>
1743        </listitem>
1744      </varlistentry>
1745
1746      <varlistentry>
1747        <term><option>--after</option></term>
1748
1749        <listitem>
1750          <para>With <command>list-dependencies</command>, show the
1751          units that are ordered before the specified unit. In other
1752          words, recursively list units following the
1753          <varname>After=</varname> dependency.</para>
1754
1755          <para>Note that any <varname>After=</varname> dependency is
1756          automatically mirrored to create a
1757          <varname>Before=</varname> dependency. Temporal dependencies
1758          may be specified explicitly, but are also created implicitly
1759          for units which are <varname>WantedBy=</varname> targets
1760          (see
1761          <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
1762          and as a result of other directives (for example
1763          <varname>RequiresMountsFor=</varname>). Both explicitly
1764          and implicitly introduced dependencies are shown with
1765          <command>list-dependencies</command>.</para>
1766
1767          <para>When passed to the <command>list-jobs</command> command, for each printed job show which other jobs are
1768          waiting for it. May be combined with <option>--before</option> to show both the jobs waiting for each job as
1769          well as all jobs each job is waiting for.</para>
1770        </listitem>
1771      </varlistentry>
1772
1773      <varlistentry>
1774        <term><option>--before</option></term>
1775
1776        <listitem>
1777          <para>With <command>list-dependencies</command>, show the
1778          units that are ordered after the specified unit. In other
1779          words, recursively list units following the
1780          <varname>Before=</varname> dependency.</para>
1781
1782          <para>When passed to the <command>list-jobs</command> command, for each printed job show which other jobs it
1783          is waiting for. May be combined with <option>--after</option> to show both the jobs waiting for each job as
1784          well as all jobs each job is waiting for.</para>
1785        </listitem>
1786      </varlistentry>
1787
1788      <varlistentry>
1789        <term><option>--with-dependencies</option></term>
1790
1791        <listitem>
1792          <para>When used with <command>status</command>,
1793          <command>cat</command>, <command>list-units</command>, and
1794          <command>list-unit-files</command>, those commands print all
1795          specified units and the dependencies of those units.</para>
1796
1797          <para>Options <option>--reverse</option>,
1798          <option>--after</option>, <option>--before</option>
1799          may be used to change what types of dependencies
1800          are shown.</para>
1801        </listitem>
1802      </varlistentry>
1803
1804      <varlistentry>
1805        <term><option>-l</option></term>
1806        <term><option>--full</option></term>
1807
1808        <listitem>
1809          <para>Do not ellipsize unit names, process tree entries,
1810          journal output, or truncate unit descriptions in the output
1811          of <command>status</command>, <command>list-units</command>,
1812          <command>list-jobs</command>, and
1813          <command>list-timers</command>.</para>
1814          <para>Also, show installation targets in the output of
1815          <command>is-enabled</command>.</para>
1816        </listitem>
1817      </varlistentry>
1818
1819      <varlistentry>
1820        <term><option>--value</option></term>
1821
1822        <listitem>
1823          <para>When printing properties with <command>show</command>, only print the value, and skip the
1824          property name and <literal>=</literal>. Also see option <option>-P</option> above.</para>
1825        </listitem>
1826      </varlistentry>
1827
1828      <varlistentry>
1829        <term><option>--show-types</option></term>
1830
1831        <listitem>
1832          <para>When showing sockets, show the type of the socket.</para>
1833        </listitem>
1834      </varlistentry>
1835
1836      <varlistentry>
1837        <term><option>--job-mode=</option></term>
1838
1839        <listitem>
1840        <para>When queuing a new job, this option controls how to deal with
1841        already queued jobs. It takes one of <literal>fail</literal>,
1842        <literal>replace</literal>,
1843        <literal>replace-irreversibly</literal>,
1844        <literal>isolate</literal>,
1845        <literal>ignore-dependencies</literal>,
1846        <literal>ignore-requirements</literal>,
1847        <literal>flush</literal>, or
1848        <literal>triggering</literal>. Defaults to
1849        <literal>replace</literal>, except when the
1850        <command>isolate</command> command is used which implies the
1851        <literal>isolate</literal> job mode.</para>
1852
1853        <para>If <literal>fail</literal> is specified and a requested
1854        operation conflicts with a pending job (more specifically:
1855        causes an already pending start job to be reversed into a stop
1856        job or vice versa), cause the operation to fail.</para>
1857
1858        <para>If <literal>replace</literal> (the default) is
1859        specified, any conflicting pending job will be replaced, as
1860        necessary.</para>
1861
1862        <para>If <literal>replace-irreversibly</literal> is specified,
1863        operate like <literal>replace</literal>, but also mark the new
1864        jobs as irreversible. This prevents future conflicting
1865        transactions from replacing these jobs (or even being enqueued
1866        while the irreversible jobs are still pending). Irreversible
1867        jobs can still be cancelled using the <command>cancel</command>
1868        command. This job mode should be used on any transaction which
1869        pulls in <filename>shutdown.target</filename>.</para>
1870
1871        <para><literal>isolate</literal> is only valid for start
1872        operations and causes all other units to be stopped when the
1873        specified unit is started. This mode is always used when the
1874        <command>isolate</command> command is used.</para>
1875
1876        <para><literal>flush</literal> will cause all queued jobs to
1877        be canceled when the new job is enqueued.</para>
1878
1879        <para>If <literal>ignore-dependencies</literal> is specified,
1880        then all unit dependencies are ignored for this new job and
1881        the operation is executed immediately. If passed, no required
1882        units of the unit passed will be pulled in, and no ordering
1883        dependencies will be honored. This is mostly a debugging and
1884        rescue tool for the administrator and should not be used by
1885        applications.</para>
1886
1887        <para><literal>ignore-requirements</literal> is similar to
1888        <literal>ignore-dependencies</literal>, but only causes the
1889        requirement dependencies to be ignored, the ordering
1890        dependencies will still be honored.</para>
1891        </listitem>
1892
1893        <para><literal>triggering</literal> may only be used with
1894        <command>systemctl stop</command>. In this mode, the specified
1895        unit and any active units that trigger it are stopped. See the
1896        discussion of
1897        <varname>Triggers=</varname> in <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1898        for more information about triggering units.</para>
1899
1900      </varlistentry>
1901
1902      <varlistentry>
1903        <term><option>-T</option></term>
1904        <term><option>--show-transaction</option></term>
1905
1906        <listitem>
1907          <para>When enqueuing a unit job (for example as effect of a <command>systemctl start</command>
1908          invocation or similar), show brief information about all jobs enqueued, covering both the requested
1909          job and any added because of unit dependencies. Note that the output will only include jobs
1910          immediately part of the transaction requested. It is possible that service start-up program code
1911          run as effect of the enqueued jobs might request further jobs to be pulled in. This means that
1912          completion of the listed jobs might ultimately entail more jobs than the listed ones.</para>
1913        </listitem>
1914      </varlistentry>
1915
1916      <varlistentry>
1917        <term><option>--fail</option></term>
1918
1919        <listitem>
1920          <para>Shorthand for <option>--job-mode=</option>fail.</para>
1921          <para>When used with the <command>kill</command> command,
1922          if no units were killed, the operation results in an error.
1923          </para>
1924        </listitem>
1925      </varlistentry>
1926
1927      <varlistentry>
1928        <term><option>--check-inhibitors=</option></term>
1929
1930        <listitem>
1931          <para>When system shutdown or sleep state is request, this option controls how to deal with
1932          inhibitor locks. It takes one of <literal>auto</literal>, <literal>yes</literal> or
1933          <literal>no</literal>. Defaults to <literal>auto</literal>, which will behave like
1934          <literal>yes</literal> for interactive invocations (i.e. from a TTY) and <literal>no</literal>
1935          for non-interactive invocations.
1936          <literal>yes</literal> will let the request respect inhibitor locks.
1937          <literal>no</literal> will let the request ignore inhibitor locks.
1938          </para>
1939          <para>Applications can establish inhibitor locks to avoid that certain important operations
1940          (such as CD burning or suchlike) are interrupted by system shutdown or a sleep state. Any user may
1941          take these locks and privileged users may override these locks.
1942          If any locks are taken, shutdown and sleep state requests will normally fail (unless privileged)
1943          and a list of active locks is printed.
1944          However, if <literal>no</literal> is specified or <literal>auto</literal> is specified on a
1945          non-interactive requests, the established locks are ignored and not shown, and the operation
1946          attempted anyway, possibly requiring additional privileges.
1947          May be overridden by <option>--force</option>.</para>
1948        </listitem>
1949      </varlistentry>
1950
1951      <varlistentry>
1952        <term><option>-i</option></term>
1953
1954        <listitem>
1955          <para>Shortcut for <option>--check-inhibitors=no</option>.</para>
1956        </listitem>
1957      </varlistentry>
1958
1959      <varlistentry>
1960        <term><option>--dry-run</option></term>
1961
1962        <listitem>
1963          <para>Just print what would be done. Currently supported by verbs
1964          <command>halt</command>, <command>poweroff</command>, <command>reboot</command>,
1965          <command>kexec</command>, <command>suspend</command>, <command>hibernate</command>,
1966          <command>hybrid-sleep</command>, <command>suspend-then-hibernate</command>,
1967          <command>default</command>, <command>rescue</command>,
1968          <command>emergency</command>, and <command>exit</command>.</para>
1969        </listitem>
1970      </varlistentry>
1971
1972      <varlistentry>
1973        <term><option>-q</option></term>
1974        <term><option>--quiet</option></term>
1975
1976        <listitem>
1977          <para>Suppress printing of the results of various commands
1978          and also the hints about truncated log lines. This does not
1979          suppress output of commands for which the printed output is
1980          the only result (like <command>show</command>). Errors are
1981          always printed.</para>
1982        </listitem>
1983      </varlistentry>
1984
1985      <varlistentry>
1986        <term><option>--no-block</option></term>
1987
1988        <listitem>
1989          <para>Do not synchronously wait for the requested operation
1990          to finish. If this is not specified, the job will be
1991          verified, enqueued and <command>systemctl</command> will
1992          wait until the unit's start-up is completed. By passing this
1993          argument, it is only verified and enqueued. This option may not be
1994          combined with <option>--wait</option>.</para>
1995        </listitem>
1996      </varlistentry>
1997
1998      <varlistentry>
1999        <term><option>--wait</option></term>
2000
2001        <listitem>
2002          <para>Synchronously wait for started units to terminate again.
2003          This option may not be combined with <option>--no-block</option>.
2004          Note that this will wait forever if any given unit never terminates
2005          (by itself or by getting stopped explicitly); particularly services
2006          which use <literal>RemainAfterExit=yes</literal>.</para>
2007
2008          <para>When used with <command>is-system-running</command>, wait
2009          until the boot process is completed before returning.</para>
2010        </listitem>
2011      </varlistentry>
2012
2013      <xi:include href="user-system-options.xml" xpointer="user" />
2014      <xi:include href="user-system-options.xml" xpointer="system" />
2015
2016      <varlistentry>
2017        <term><option>--failed</option></term>
2018
2019        <listitem>
2020          <para>List units in failed state. This is equivalent to
2021          <option>--state=failed</option>.</para>
2022        </listitem>
2023      </varlistentry>
2024
2025      <varlistentry>
2026        <term><option>--no-wall</option></term>
2027
2028        <listitem>
2029          <para>Do not send wall message before halt, power-off and reboot.</para>
2030        </listitem>
2031      </varlistentry>
2032
2033      <varlistentry>
2034        <term><option>--global</option></term>
2035
2036        <listitem>
2037          <para>When used with <command>enable</command> and
2038          <command>disable</command>, operate on the global user
2039          configuration directory, thus enabling or disabling a unit
2040          file globally for all future logins of all users.</para>
2041        </listitem>
2042      </varlistentry>
2043
2044      <varlistentry>
2045        <term><option>--no-reload</option></term>
2046
2047        <listitem>
2048          <para>When used with <command>enable</command> and
2049          <command>disable</command>, do not implicitly reload daemon
2050          configuration after executing the changes.</para>
2051        </listitem>
2052      </varlistentry>
2053
2054      <varlistentry>
2055        <term><option>--no-ask-password</option></term>
2056
2057        <listitem>
2058          <para>When used with <command>start</command> and related
2059          commands, disables asking for passwords. Background services
2060          may require input of a password or passphrase string, for
2061          example to unlock system hard disks or cryptographic
2062          certificates. Unless this option is specified and the
2063          command is invoked from a terminal,
2064          <command>systemctl</command> will query the user on the
2065          terminal for the necessary secrets. Use this option to
2066          switch this behavior off. In this case, the password must be
2067          supplied by some other means (for example graphical password
2068          agents) or the service might fail. This also disables
2069          querying the user for authentication for privileged
2070          operations.</para>
2071        </listitem>
2072      </varlistentry>
2073
2074      <varlistentry>
2075        <term><option>--kill-who=</option></term>
2076
2077        <listitem>
2078          <para>When used with <command>kill</command>, choose which
2079          processes to send a signal to. Must be one of
2080          <option>main</option>, <option>control</option> or
2081          <option>all</option> to select whether to kill only the main
2082          process, the control process or all processes of the
2083          unit. The main process of the unit is the one that defines
2084          the life-time of it. A control process of a unit is one that
2085          is invoked by the manager to induce state changes of it. For
2086          example, all processes started due to the
2087          <varname>ExecStartPre=</varname>,
2088          <varname>ExecStop=</varname> or
2089          <varname>ExecReload=</varname> settings of service units are
2090          control processes. Note that there is only one control
2091          process per unit at a time, as only one state change is
2092          executed at a time. For services of type
2093          <varname>Type=forking</varname>, the initial process started
2094          by the manager for <varname>ExecStart=</varname> is a
2095          control process, while the process ultimately forked off by
2096          that one is then considered the main process of the unit (if
2097          it can be determined). This is different for service units
2098          of other types, where the process forked off by the manager
2099          for <varname>ExecStart=</varname> is always the main process
2100          itself. A service unit consists of zero or one main process,
2101          zero or one control process plus any number of additional
2102          processes. Not all unit types manage processes of these
2103          types however. For example, for mount units, control processes
2104          are defined (which are the invocations of
2105          <filename>&MOUNT_PATH;</filename> and
2106          <filename>&UMOUNT_PATH;</filename>), but no main process
2107          is defined. If omitted, defaults to
2108          <option>all</option>.</para>
2109        </listitem>
2110      </varlistentry>
2111
2112      <xi:include href="standard-options.xml" xpointer="signal" />
2113
2114      <varlistentry>
2115        <term><option>--what=</option></term>
2116
2117        <listitem>
2118          <para>Select what type of per-unit resources to remove when the <command>clean</command> command is
2119          invoked, see below. Takes one of <constant>configuration</constant>, <constant>state</constant>,
2120          <constant>cache</constant>, <constant>logs</constant>, <constant>runtime</constant> to select the
2121          type of resource. This option may be specified more than once, in which case all specified resource
2122          types are removed. Also accepts the special value <constant>all</constant> as a shortcut for
2123          specifying all five resource types. If this option is not specified defaults to the combination of
2124          <constant>cache</constant> and <constant>runtime</constant>, i.e. the two kinds of resources that
2125          are generally considered to be redundant and can be reconstructed on next invocation.</para>
2126        </listitem>
2127      </varlistentry>
2128
2129      <varlistentry>
2130        <term><option>-f</option></term>
2131        <term><option>--force</option></term>
2132
2133        <listitem>
2134          <para>When used with <command>enable</command>, overwrite
2135          any existing conflicting symlinks.</para>
2136
2137          <para>When used with <command>edit</command>, create all of the
2138          specified units which do not already exist.</para>
2139
2140          <para>When used with <command>halt</command>, <command>poweroff</command>, <command>reboot</command> or
2141          <command>kexec</command>, execute the selected operation without shutting down all units. However, all
2142          processes will be killed forcibly and all file systems are unmounted or remounted read-only. This is hence a
2143          drastic but relatively safe option to request an immediate reboot. If <option>--force</option> is specified
2144          twice for these operations (with the exception of <command>kexec</command>), they will be executed
2145          immediately, without terminating any processes or unmounting any file systems. Warning: specifying
2146          <option>--force</option> twice with any of these operations might result in data loss. Note that when
2147          <option>--force</option> is specified twice the selected operation is executed by
2148          <command>systemctl</command> itself, and the system manager is not contacted. This means the command should
2149          succeed even when the system manager has crashed.</para>
2150        </listitem>
2151      </varlistentry>
2152
2153      <varlistentry>
2154        <term><option>--message=</option></term>
2155
2156        <listitem>
2157          <para>When used with <command>halt</command>, <command>poweroff</command> or <command>reboot</command>, set a
2158          short message explaining the reason for the operation. The message will be logged together with the default
2159          shutdown message.</para>
2160        </listitem>
2161      </varlistentry>
2162
2163      <varlistentry>
2164        <term><option>--now</option></term>
2165
2166        <listitem>
2167          <para>When used with <command>enable</command>, the units
2168          will also be started. When used with <command>disable</command> or
2169          <command>mask</command>, the units will also be stopped. The start
2170          or stop operation is only carried out when the respective enable or
2171          disable operation has been successful.</para>
2172        </listitem>
2173      </varlistentry>
2174
2175      <varlistentry>
2176        <term><option>--root=</option></term>
2177
2178        <listitem>
2179          <para>When used with
2180          <command>enable</command>/<command>disable</command>/<command>is-enabled</command>
2181          (and related commands), use the specified root path when looking for unit
2182          files. If this option is present, <command>systemctl</command> will operate on
2183          the file system directly, instead of communicating with the <command>systemd</command>
2184          daemon to carry out changes.</para>
2185        </listitem>
2186
2187      </varlistentry>
2188
2189      <varlistentry>
2190        <term><option>--runtime</option></term>
2191
2192        <listitem>
2193          <para>When used with <command>enable</command>,
2194          <command>disable</command>, <command>edit</command>,
2195          (and related commands), make changes only temporarily, so
2196          that they are lost on the next reboot. This will have the
2197          effect that changes are not made in subdirectories of
2198          <filename>/etc/</filename> but in <filename>/run/</filename>,
2199          with identical immediate effects, however, since the latter
2200          is lost on reboot, the changes are lost too.</para>
2201
2202          <para>Similarly, when used with
2203          <command>set-property</command>, make changes only
2204          temporarily, so that they are lost on the next
2205          reboot.</para>
2206        </listitem>
2207      </varlistentry>
2208
2209      <varlistentry>
2210        <term><option>--preset-mode=</option></term>
2211
2212        <listitem>
2213          <para>Takes one of <literal>full</literal> (the default),
2214          <literal>enable-only</literal>,
2215          <literal>disable-only</literal>. When used with the
2216          <command>preset</command> or <command>preset-all</command>
2217          commands, controls whether units shall be disabled and
2218          enabled according to the preset rules, or only enabled, or
2219          only disabled.</para>
2220        </listitem>
2221      </varlistentry>
2222
2223      <varlistentry>
2224        <term><option>-n</option></term>
2225        <term><option>--lines=</option></term>
2226
2227        <listitem>
2228          <para>When used with <command>status</command>, controls the number of journal lines to show,
2229          counting from the most recent ones. Takes a positive integer argument, or 0 to disable journal
2230          output. Defaults to 10.</para>
2231        </listitem>
2232      </varlistentry>
2233
2234      <varlistentry>
2235        <term><option>-o</option></term>
2236        <term><option>--output=</option></term>
2237
2238        <listitem>
2239          <para>When used with <command>status</command>, controls the
2240          formatting of the journal entries that are shown. For the
2241          available choices, see
2242          <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
2243          Defaults to <literal>short</literal>.</para>
2244        </listitem>
2245      </varlistentry>
2246
2247      <varlistentry>
2248        <term><option>--firmware-setup</option></term>
2249
2250        <listitem>
2251          <para>When used with the <command>reboot</command> command, indicate to the system's firmware to
2252          reboot into the firmware setup interface. Note that this functionality is not available on all
2253          systems.</para>
2254        </listitem>
2255      </varlistentry>
2256
2257      <varlistentry>
2258        <term><option>--boot-loader-menu=<replaceable>timeout</replaceable></option></term>
2259
2260        <listitem>
2261          <para>When used with the <command>reboot</command> command, indicate to the system's boot loader to
2262          show the boot loader menu on the following boot. Takes a time value as parameter — indicating the
2263          menu timeout. Pass zero in order to disable the menu timeout. Note that not all boot loaders
2264          support this functionality.</para>
2265        </listitem>
2266      </varlistentry>
2267
2268      <varlistentry>
2269        <term><option>--boot-loader-entry=<replaceable>ID</replaceable></option></term>
2270
2271        <listitem>
2272          <para>When used with the <command>reboot</command> command, indicate to the system's boot loader to
2273          boot into a specific boot loader entry on the following boot. Takes a boot loader entry identifier
2274          as argument, or <literal>help</literal> in order to list available entries. Note that not all boot
2275          loaders support this functionality.</para>
2276        </listitem>
2277      </varlistentry>
2278
2279      <varlistentry>
2280        <term><option>--reboot-argument=</option></term>
2281
2282        <listitem>
2283          <para>This switch is used with <command>reboot</command>. The value is architecture and firmware specific. As an example, <literal>recovery</literal>
2284            might be used to trigger system recovery, and <literal>fota</literal> might be used to trigger a
2285            <quote>firmware over the air</quote> update.</para>
2286        </listitem>
2287      </varlistentry>
2288
2289      <varlistentry>
2290        <term><option>--plain</option></term>
2291
2292        <listitem>
2293          <para>When used with <command>list-dependencies</command>,
2294          <command>list-units</command> or <command>list-machines</command>,
2295          the output is printed as a list instead of a tree, and the bullet
2296          circles are omitted.</para>
2297        </listitem>
2298      </varlistentry>
2299
2300      <varlistentry>
2301        <term><option>--timestamp=</option></term>
2302
2303        <listitem>
2304          <para>Change the format of printed timestamps. The following values may be used:
2305          </para>
2306
2307          <variablelist>
2308            <varlistentry>
2309              <term><option>pretty</option> (this is the default)</term>
2310              <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS TZ</literal></para></listitem>
2311            </varlistentry>
2312          </variablelist>
2313
2314          <variablelist>
2315            <varlistentry>
2316              <term><option>unix</option></term>
2317              <listitem><para><literal>@seconds-since-the-epoch</literal></para></listitem>
2318            </varlistentry>
2319          </variablelist>
2320
2321          <variablelist>
2322            <varlistentry>
2323              <term><option>us</option></term>
2324              <term><option>µs</option></term>
2325              <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS.UUUUUU TZ</literal></para></listitem>
2326            </varlistentry>
2327          </variablelist>
2328
2329          <variablelist>
2330            <varlistentry>
2331              <term><option>utc</option></term>
2332              <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS UTC</literal></para></listitem>
2333            </varlistentry>
2334          </variablelist>
2335
2336          <variablelist>
2337            <varlistentry>
2338              <term><option>us+utc</option></term>
2339              <term><option>µs+utc</option></term>
2340              <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS.UUUUUU UTC</literal></para></listitem>
2341            </varlistentry>
2342          </variablelist>
2343        </listitem>
2344      </varlistentry>
2345
2346      <varlistentry>
2347        <term><option>--mkdir</option></term>
2348
2349        <listitem><para>When used with <command>bind</command>, creates the destination file or directory before
2350        applying the bind mount. Note that even though the name of this option suggests that it is suitable only for
2351        directories, this option also creates the destination file node to mount over if the object to mount is not
2352        a directory, but a regular file, device node, socket or FIFO.</para></listitem>
2353      </varlistentry>
2354
2355      <varlistentry>
2356        <term><option>--marked</option></term>
2357
2358        <listitem><para>Only allowed with <command>reload-or-restart</command>. Enqueues restart jobs for all
2359        units that have the <literal>needs-restart</literal> mark, and reload jobs for units that have the
2360        <literal>needs-reload</literal> mark. When a unit marked for reload does not support reload, restart
2361        will be queued. Those properties can be set using <command>set-property Marks</command>.</para>
2362
2363        <para>Unless <option>--no-block</option> is used, <command>systemctl</command> will wait for the
2364        queued jobs to finish.</para></listitem>
2365      </varlistentry>
2366
2367      <varlistentry>
2368        <term><option>--read-only</option></term>
2369
2370        <listitem><para>When used with <command>bind</command>, creates a read-only bind mount.</para></listitem>
2371      </varlistentry>
2372
2373      <xi:include href="user-system-options.xml" xpointer="host" />
2374      <xi:include href="user-system-options.xml" xpointer="machine" />
2375
2376      <xi:include href="standard-options.xml" xpointer="no-pager" />
2377      <xi:include href="standard-options.xml" xpointer="legend" />
2378      <xi:include href="standard-options.xml" xpointer="help" />
2379      <xi:include href="standard-options.xml" xpointer="version" />
2380    </variablelist>
2381  </refsect1>
2382
2383  <refsect1>
2384    <title>Exit status</title>
2385
2386    <para>On success, 0 is returned, a non-zero failure code otherwise.</para>
2387
2388    <para><command>systemctl</command> uses the return codes defined by LSB, as defined in
2389    <ulink url="http://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/iniscrptact.html">LSB 3.0.0</ulink>.
2390    </para>
2391
2392    <table>
2393      <title>LSB return codes</title>
2394
2395      <tgroup cols='3'>
2396        <thead>
2397          <row>
2398            <entry>Value</entry>
2399            <entry>Description in LSB</entry>
2400            <entry>Use in systemd</entry>
2401          </row>
2402        </thead>
2403        <tbody>
2404          <row>
2405            <entry><constant>0</constant></entry>
2406            <entry>"program is running or service is OK"</entry>
2407            <entry>unit is active</entry>
2408          </row>
2409          <row>
2410            <entry><constant>1</constant></entry>
2411            <entry>"program is dead and <filename>/var/run</filename> pid file exists"</entry>
2412            <entry>unit <emphasis>not</emphasis> failed (used by <command>is-failed</command>)</entry>
2413          </row>
2414          <row>
2415            <entry><constant>2</constant></entry>
2416            <entry>"program is dead and <filename>/var/lock</filename> lock file exists"</entry>
2417            <entry>unused</entry>
2418          </row>
2419          <row>
2420            <entry><constant>3</constant></entry>
2421            <entry>"program is not running"</entry>
2422            <entry>unit is not active</entry>
2423          </row>
2424          <row>
2425            <entry><constant>4</constant></entry>
2426            <entry>"program or service status is unknown"</entry>
2427            <entry>no such unit</entry>
2428          </row>
2429        </tbody>
2430      </tgroup>
2431    </table>
2432
2433    <para>The mapping of LSB service states to systemd unit states is imperfect, so it is better to
2434    not rely on those return values but to look for specific unit states and substates instead.
2435    </para>
2436  </refsect1>
2437
2438  <refsect1>
2439    <title>Environment</title>
2440
2441    <variablelist class='environment-variables'>
2442      <varlistentry>
2443        <term><varname>$SYSTEMD_EDITOR</varname></term>
2444
2445        <listitem><para>Editor to use when editing units; overrides
2446        <varname>$EDITOR</varname> and <varname>$VISUAL</varname>. If neither
2447        <varname>$SYSTEMD_EDITOR</varname> nor <varname>$EDITOR</varname> nor
2448        <varname>$VISUAL</varname> are present or if it is set to an empty
2449        string or if their execution failed, systemctl will try to execute well
2450        known editors in this order:
2451        <citerefentry project='die-net'><refentrytitle>editor</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2452        <citerefentry project='die-net'><refentrytitle>nano</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2453        <citerefentry project='die-net'><refentrytitle>vim</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2454        <citerefentry project='die-net'><refentrytitle>vi</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
2455        </para></listitem>
2456      </varlistentry>
2457    </variablelist>
2458    <xi:include href="common-variables.xml" xpointer="log-level"/>
2459    <xi:include href="common-variables.xml" xpointer="log-color"/>
2460    <xi:include href="common-variables.xml" xpointer="log-time"/>
2461    <xi:include href="common-variables.xml" xpointer="log-location"/>
2462    <xi:include href="common-variables.xml" xpointer="log-target"/>
2463    <xi:include href="common-variables.xml" xpointer="pager"/>
2464    <xi:include href="common-variables.xml" xpointer="less"/>
2465    <xi:include href="common-variables.xml" xpointer="lesscharset"/>
2466    <xi:include href="common-variables.xml" xpointer="lesssecure"/>
2467    <xi:include href="common-variables.xml" xpointer="colors"/>
2468    <xi:include href="common-variables.xml" xpointer="urlify"/>
2469  </refsect1>
2470
2471  <refsect1>
2472    <title>See Also</title>
2473    <para>
2474      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2475      <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2476      <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2477      <citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2478      <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2479      <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2480      <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
2481      <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2482      <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2483      <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
2484      <citerefentry project='man-pages'><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
2485    </para>
2486  </refsect1>
2487
2488</refentry>
2489