Debian Codegraph @

man/systemctl.xml

raw
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.5/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 are not instantiated are not runnable, and will thus never show up
70 in the output of this command. Specifically this means that <filename>[email protected]</filename>
71 will never be shown in this list — unless instantiated, e.g. as
72 <filename>[email protected]</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 ● [email protected] loaded failed failed User Manager for UID 1000
83 …
84 systemd-tmpfiles-clean.timer loaded active waiting Daily Cleanup of Temporary Directories
85
86 LOAD = Reflects whether the unit definition was properly loaded.
87 ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
88 SUB = The low-level unit activation state, values depend on unit type.
89
90 123 loaded units listed. Pass --all to see loaded but inactive units, too.
91 To 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 the
100 following:</para>
101
102 <xi:include href="unit-states.xml" xpointer="table"/>
103
104 <para>The SUB column shows the unit-type-specific detailed state of the unit, possible values
105 vary by unit type. The list of possible LOAD, ACTIVE, and SUB states is not constant and new
106 systemd releases may both add and remove values.
107 <programlisting>systemctl --state=help</programlisting> command may be used to display the
108 current set of possible values.</para>
109
110 <para>This is the default command.</para>
111 </listitem>
112 </varlistentry>
113
114 <varlistentry>
115 <term><command>list-automounts</command> <optional><replaceable>PATTERN</replaceable>…</optional></term>
116
117 <listitem>
118 <para>List automount units currently in memory, ordered by mount path. If one or more
119 <replaceable>PATTERN</replaceable>s are specified, only automount units matching one of them are shown.
120 Produces output similar to
121 <programlisting>
122 WHAT WHERE MOUNTED IDLE TIMEOUT UNIT
123 /dev/sdb1 /mnt/test no 120s mnt-test.automount
124 binfmt_misc /proc/sys/fs/binfmt_misc yes 0 proc-sys-fs-binfmt_misc.automount
125
126 2 automounts listed.</programlisting>
127 </para>
128
129 <para>Also see <option>--show-types</option>, <option>--all</option>, and <option>--state=</option>.</para>
130
131 <xi:include href="version-info.xml" xpointer="v252"/>
132 </listitem>
133 </varlistentry>
134
135 <varlistentry>
136 <term><command>list-paths</command> <optional><replaceable>PATTERN</replaceable>…</optional></term>
137
138 <listitem>
139 <para>List path units currently in memory, ordered by path. If one or more
140 <replaceable>PATTERN</replaceable>s are specified, only path units matching one of them are shown.
141 Produces output similar to
142 <programlisting>
143 PATH CONDITION UNIT ACTIVATES
144 /run/systemd/ask-password DirectoryNotEmpty systemd-ask-password-plymouth.path systemd-ask-password-plymouth.service
145 /run/systemd/ask-password DirectoryNotEmpty systemd-ask-password-wall.path systemd-ask-password-wall.service
146 /var/cache/cups/org.cups.cupsd PathExists cups.path cups.service
147
148 3 paths listed.</programlisting>
149 </para>
150
151 <para>Also see <option>--show-types</option>, <option>--all</option>, and <option>--state=</option>.</para>
152
153 <xi:include href="version-info.xml" xpointer="v254"/>
154 </listitem>
155 </varlistentry>
156
157 <varlistentry>
158 <term><command>list-sockets</command> <optional><replaceable>PATTERN</replaceable>…</optional></term>
159
160 <listitem>
161 <para>List socket units currently in memory, ordered by listening address. If one or more
162 <replaceable>PATTERN</replaceable>s are specified, only socket units matching one of them are
163 shown. Produces output similar to
164 <programlisting>
165 LISTEN UNIT ACTIVATES
166 kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
167 /dev/rfkill systemd-rfkill.socket systemd-rfkill.service
168 …
169
170 5 sockets listed.</programlisting>
171 Note: because the addresses might contains spaces, this output
172 is not suitable for programmatic consumption.
173 </para>
174
175 <para>Also see <option>--show-types</option>, <option>--all</option>, and <option>--state=</option>.</para>
176
177 <xi:include href="version-info.xml" xpointer="v202"/>
178 </listitem>
179 </varlistentry>
180
181 <varlistentry>
182 <term><command>list-timers</command> <optional><replaceable>PATTERN</replaceable>…</optional></term>
183
184 <listitem>
185 <para>List timer units currently in memory, ordered by the time they elapse next. If one or more
186 <replaceable>PATTERN</replaceable>s are specified, only units matching one of them are shown.
187 Produces output similar to
188 <programlisting>
189 NEXT LEFT LAST PASSED UNIT ACTIVATES
190 - - Thu 2017-02-23 13:40:29 EST 3 days ago ureadahead-stop.timer ureadahead-stop.service
191 Sun 2017-02-26 18:55:42 EST 1min 14s left Thu 2017-02-23 13:54:44 EST 3 days ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
192 Sun 2017-02-26 20:37:16 EST 1h 42min left Sun 2017-02-26 11:56:36 EST 6h ago apt-daily.timer apt-daily.service
193 Sun 2017-02-26 20:57:49 EST 2h 3min left Sun 2017-02-26 11:56:36 EST 6h ago snapd.refresh.timer snapd.refresh.service
194 </programlisting>
195 </para>
196
197 <para><emphasis>NEXT</emphasis> shows the next time the timer will run.</para>
198 <para><emphasis>LEFT</emphasis> shows how long till the next time the timer runs.</para>
199 <para><emphasis>LAST</emphasis> shows the last time the timer ran.</para>
200 <para><emphasis>PASSED</emphasis> shows how long has passed since the timer last ran.</para>
201 <para><emphasis>UNIT</emphasis> shows the name of the timer</para>
202 <para><emphasis>ACTIVATES</emphasis> shows the name the service the timer activates when it runs.</para>
203
204 <para>Also see <option>--all</option> and <option>--state=</option>.</para>
205
206 <xi:include href="version-info.xml" xpointer="v209"/>
207 </listitem>
208 </varlistentry>
209
210 <varlistentry>
211 <term><command>is-active <replaceable>PATTERN</replaceable>…</command></term>
212
213 <listitem>
214 <para>Check whether any of the specified units are active
215 (i.e. running). Returns an exit code
216 <constant>0</constant> if at least one is active, or
217 non-zero otherwise. Unless <option>--quiet</option> is
218 specified, this will also print the current unit state to
219 standard output.</para>
220 </listitem>
221 </varlistentry>
222
223 <varlistentry>
224 <term><command>is-failed <optional><replaceable>PATTERN</replaceable>…</optional></command></term>
225
226 <listitem>
227 <para>Check whether any of the specified units is in the "failed" state. If no unit is specified,
228 check whether there are any failed units or ordering cycles, which corresponds to the <literal>degraded</literal>
229 state returned by <command>is-system-running</command>. Returns an exit code <constant>0</constant>
230 if at least one has failed, non-zero otherwise. Unless <option>--quiet</option> is specified, this
231 will also print the current unit or system state to standard output.</para>
232
233 <xi:include href="version-info.xml" xpointer="v197"/>
234 </listitem>
235 </varlistentry>
236
237 <varlistentry>
238 <term><command>status</command> <optional><replaceable>PATTERN</replaceable>…|<replaceable>PID</replaceable>…]</optional></term>
239
240 <listitem>
241 <para>Show runtime status information about the whole system or about one or more units followed
242 by most recent log data from the journal. If no positional arguments are specified, and no unit
243 filter is given with <option>--type=</option>, <option>--state=</option>, or
244 <option>--failed</option>, shows the status of the whole system. If combined with
245 <option>--all</option>, follows that with the status of all units. If positional arguments are
246 specified, each positional argument is treated as either a unit name to show, or a glob pattern
247 to show units whose names match that pattern, or a PID to show the unit containing that PID. When
248 <option>--type=</option>, <option>--state=</option>, or <option>--failed</option> are used, units
249 are additionally filtered by the TYPE and ACTIVE state.</para>
250
251 <para>This function is intended to generate human-readable output. If you are looking for
252 computer-parsable output, use <command>show</command> instead. By default, this function only
253 shows 10 lines of output and ellipsizes lines to fit in the terminal window. This can be changed
254 with <option>--lines</option> and <option>--full</option>, see above. In addition,
255 <command>journalctl --unit=<replaceable>NAME</replaceable></command> or <command>journalctl
256 --user-unit=<replaceable>NAME</replaceable></command> use a similar filter for messages and might
257 be more convenient.</para>
258
259 <para>Note that this operation only displays <emphasis>runtime</emphasis> status, i.e. information about
260 the current invocation of the unit (if it is running) or the most recent invocation (if it is not
261 running anymore, and has not been released from memory). Information about earlier invocations,
262 invocations from previous system boots, or prior invocations that have already been released from
263 memory may be retrieved via <command>journalctl --unit=</command>.</para>
264
265 <para>systemd implicitly loads units as necessary, so just running the <command>status</command>
266 will attempt to load a file. The command is thus not useful for determining if something was
267 already loaded or not. The units may possibly also be quickly unloaded after the operation is
268 completed if there's no reason to keep it in memory thereafter.</para>
269
270 <example>
271 <title>Example output from systemctl status </title>
272
273 <programlisting>$ systemctl status bluetooth
274 ● bluetooth.service - Bluetooth service
275 Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: enabled)
276 Active: active (running) since Wed 2017-01-04 13:54:04 EST; 1 weeks 0 days ago
277 Docs: man:bluetoothd(8)
278 Main PID: 930 (bluetoothd)
279 Status: "Running"
280 Tasks: 1
281 Memory: 648.0K
282 CPU: 435ms
283 CGroup: /system.slice/bluetooth.service
284 └─930 /usr/lib/bluetooth/bluetoothd
285
286 Jan 12 10:46:45 example.com bluetoothd[8900]: Not enough free handles to register service
287 Jan 12 10:46:45 example.com bluetoothd[8900]: Current Time Service could not be registered
288 Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output error (5)
289 </programlisting>
290
291 <para>The dot ("●") uses color on supported terminals to summarize the unit state at a
292 glance. Along with its color, its shape varies according to its state:
293 <literal>inactive</literal> or <literal>maintenance</literal> is a white circle ("○"),
294 <literal>active</literal> is a green dot ("●"), <literal>deactivating</literal> is a white dot,
295 <literal>failed</literal> or <literal>error</literal> is a red cross ("×"), and
296 <literal>reloading</literal> or <literal>refreshing</literal> is a green clockwise circle arrow
297 ("↻").</para>
298
299 <para>The "Loaded:" line in the output will show <literal>loaded</literal> if the unit has been
300 loaded into memory. Other possible values for "Loaded:" include: <literal>error</literal> if
301 there was a problem loading it, <literal>not-found</literal> if no unit file was found for this
302 unit, <literal>bad-setting</literal> if an essential unit file setting could not be parsed and
303 <literal>masked</literal> if the unit file has been masked. Along with showing the path to the
304 unit file, this line will also show the enablement state. Enabled units are included in the
305 dependency network between units, and thus are started at boot or via some other form of
306 activation. See the full table of possible enablement states — including the definition of
307 <literal>masked</literal> — in the documentation for the <command>is-enabled</command> command.
308 </para>
309
310 <para>The "Active:" line shows active state. The value is usually <literal>active</literal> or
311 <literal>inactive</literal>. Active could mean started, bound, plugged in, etc depending on the
312 unit type. The unit could also be in process of changing states, reporting a state of
313 <literal>activating</literal> or <literal>deactivating</literal>. A special
314 <literal>failed</literal> state is entered when the service failed in some way, such as a crash,
315 exiting with an error code or timing out. If the failed state is entered the cause will be logged
316 for later reference.</para>
317 </example>
318
319 </listitem>
320 </varlistentry>
321
322 <varlistentry>
323 <term><command>show</command> <optional><replaceable>PATTERN</replaceable>…|<replaceable>JOB</replaceable>…</optional></term>
324
325 <listitem>
326 <para>Show properties of one or more units, jobs, or the manager itself. If no argument is specified,
327 properties of the manager will be shown. If a unit name is specified, properties of the unit are shown, and
328 if a job ID is specified, properties of the job are shown. By default, empty properties are suppressed. Use
329 <option>--all</option> to show those too. To select specific properties to show, use
330 <option>--property=</option>. This command is intended to be used whenever computer-parsable output is
331 required. Use <command>status</command> if you are looking for formatted human-readable output.</para>
332
333 <para>Many properties shown by <command>systemctl show</command> map directly to configuration settings of
334 the system and service manager and its unit files. Note that the properties shown by the command are
335 generally more low-level, normalized versions of the original configuration settings and expose runtime
336 state in addition to configuration. For example, properties shown for service units include the service's
337 current main process identifier as <literal>MainPID</literal> (which is runtime state), and time settings
338 are always exposed as properties ending in the <literal>…USec</literal> suffix even if a matching
339 configuration options end in <literal>…Sec</literal>, because microseconds is the normalized time unit used
340 internally by the system and service manager.</para>
341
342 <para>For details about many of these properties, see the documentation of the D-Bus interface
343 backing these properties, see
344 <citerefentry><refentrytitle>org.freedesktop.systemd1</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
345 </listitem>
346 </varlistentry>
347
348 <varlistentry>
349 <term><command>cat <replaceable>PATTERN</replaceable>…</command></term>
350
351 <listitem>
352 <para>Show backing files of one or more units. Prints the
353 "fragment" and "drop-ins" (source files) of units. Each
354 file is preceded by a comment which includes the file
355 name. Note that this shows the contents of the backing files
356 on disk, which might not match the system manager's
357 understanding of these units if any unit files were
358 updated on disk and the <command>daemon-reload</command>
359 command was not issued since.</para>
360
361 <xi:include href="version-info.xml" xpointer="v209"/>
362 </listitem>
363 </varlistentry>
364
365 <varlistentry>
366 <term><command>help <replaceable>PATTERN</replaceable>…|<replaceable>PID</replaceable>…</command></term>
367
368 <listitem>
369 <para>Show manual pages for one or more units, if
370 available. If a PID is given, the manual pages for the unit
371 the process belongs to are shown.</para>
372
373 <xi:include href="version-info.xml" xpointer="v185"/>
374 </listitem>
375 </varlistentry>
376
377 <varlistentry>
378 <term>
379 <command>list-dependencies</command>
380 <optional><replaceable>UNIT</replaceable>…</optional>
381 </term>
382
383 <listitem>
384 <para>Shows units required and wanted by the specified
385 units. This recursively lists units following the
386 <varname>Requires=</varname>, <varname>Requisite=</varname>,
387 <varname>Wants=</varname>, <varname>ConsistsOf=</varname>,
388 <varname>BindsTo=</varname>, and <varname>Upholds=</varname>
389 dependencies. If no units are specified,
390 <filename>default.target</filename> is implied.</para>
391
392 <para>The units that are shown are additionally filtered by <option>--type=</option> and
393 <option>--state=</option> if those options are specified. Note that we will not be able to
394 use a tree structure in this case, so <option>--plain</option> is implied.</para>
395
396 <para>By default, only target units are recursively
397 expanded. When <option>--all</option> is passed, all other
398 units are recursively expanded as well.</para>
399
400 <para>Options <option>--reverse</option>,
401 <option>--after</option>, <option>--before</option>
402 may be used to change what types of dependencies
403 are shown.</para>
404
405 <para>Note that this command only lists units currently loaded into memory by the service manager. In
406 particular, this command is not suitable to get a comprehensive list at all reverse dependencies on a
407 specific unit, as it will not list the dependencies declared by units currently not loaded.</para>
408
409 <xi:include href="version-info.xml" xpointer="v198"/>
410 </listitem>
411 </varlistentry>
412
413 <!-- Commands that modify unit state start here -->
414
415 <varlistentry>
416 <term><command>start <replaceable>PATTERN</replaceable>…</command></term>
417
418 <listitem>
419 <para>Start (activate) one or more units specified on the command line.</para>
420
421 <para>Note that unit glob patterns expand to names of units currently in memory. Units which are
422 not active and are not in a failed state usually are not in memory, and will not be matched by
423 any pattern. In addition, in case of instantiated units, systemd is often unaware of the instance
424 name until the instance has been started. Therefore, using glob patterns with
425 <command>start</command> has limited usefulness. Also, secondary alias names of units are not
426 considered.</para>
427
428 <para>Option <option>--all</option> may be used to also operate on inactive units which are
429 referenced by other loaded units. Note that this is not the same as operating on "all" possible
430 units, because as the previous paragraph describes, such a list is ill-defined. Nevertheless,
431 <command>systemctl start --all <replaceable>GLOB</replaceable></command> may be useful if all the
432 units that should match the pattern are pulled in by some target which is known to be loaded.
433 </para>
434 </listitem>
435 </varlistentry>
436 <varlistentry>
437 <term><command>stop <replaceable>PATTERN</replaceable>…</command></term>
438
439 <listitem>
440 <para>Stop (deactivate) one or more units specified on the command line.</para>
441
442 <para>This command will fail if the unit does not exist or if stopping of the unit is prohibited (see
443 <varname>RefuseManualStop=</varname> in
444 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
445 It will <emphasis>not</emphasis> fail if any of the commands configured to stop the unit
446 (<varname>ExecStop=</varname>, etc.) fail, because the manager will still forcibly terminate the
447 unit.</para>
448
449 <para>If a unit that gets stopped can still be triggered by other units, a warning containing
450 the names of the triggering units is shown. <option>--no-warn</option> can be used to suppress
451 the warning.</para>
452 </listitem>
453 </varlistentry>
454 <varlistentry>
455 <term><command>reload <replaceable>PATTERN</replaceable>…</command></term>
456
457 <listitem>
458 <para>Asks all units listed on the command line to reload
459 their configuration. Note that this will reload the
460 service-specific configuration, not the unit configuration
461 file of systemd. If you want systemd to reload the
462 configuration file of a unit, use the
463 <command>daemon-reload</command> command. In other words:
464 for the example case of Apache, this will reload Apache's
465 <filename>httpd.conf</filename> in the web server, not the
466 <filename>apache.service</filename> systemd unit
467 file.</para>
468
469 <para>This command should not be confused with the
470 <command>daemon-reload</command> command.</para>
471 </listitem>
472
473 </varlistentry>
474 <varlistentry>
475 <term><command>restart <replaceable>PATTERN</replaceable>…</command></term>
476
477 <listitem>
478 <para>Stop and then start one or more units specified on the command line. If the units are not running
479 yet, they will be started.</para>
480
481 <para>Note that restarting a unit with this command does not necessarily flush out all of the unit's
482 resources before it is started again. For example, the per-service file descriptor storage facility (see
483 <varname>FileDescriptorStoreMax=</varname> in
484 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>) will
485 remain intact as long as the unit has a job pending, and is only cleared when the unit is fully stopped and
486 no jobs are pending anymore. If it is intended that the file descriptor store is flushed out, too, during a
487 restart operation an explicit <command>systemctl stop</command> command followed by <command>systemctl
488 start</command> should be issued.</para>
489 </listitem>
490 </varlistentry>
491 <varlistentry>
492 <term><command>try-restart <replaceable>PATTERN</replaceable>…</command></term>
493
494 <listitem>
495 <para>Stop and then start one or more units specified on the
496 command line if the units are running. This does nothing
497 if units are not running.</para>
498 <!-- Note that we do not document condrestart here, as that is just compatibility support, and we generally
499 do not document that. -->
500 </listitem>
501 </varlistentry>
502
503 <varlistentry>
504 <term><command>enqueue-marked</command></term>
505
506 <listitem><para>Enqueue start/stop/restart/reload jobs for all units that have the respective
507 <literal>needs-*</literal> markers set. When a unit marked for reload does not support reload,
508 restart will be queued. Those properties can be set using <command>set-property Markers=…</command>.</para>
509
510 <para>Unless <option>--no-block</option> is used, <command>systemctl</command> will wait for the
511 queued jobs to finish.</para>
512
513 <xi:include href="version-info.xml" xpointer="v260"/></listitem>
514 </varlistentry>
515
516 <varlistentry>
517 <term><command>reload-or-restart <replaceable>PATTERN</replaceable>…</command></term>
518
519 <listitem>
520 <para>Reload one or more units if they support it. If not, stop and then start them instead. If the units
521 are not running yet, they will be started.</para>
522
523 <para>When used in combination with <option>--marked</option>, it is a deprecated alias of
524 <command>enqueue-marked</command>.</para>
525 </listitem>
526 </varlistentry>
527 <varlistentry>
528 <term><command>try-reload-or-restart <replaceable>PATTERN</replaceable>…</command></term>
529
530 <listitem>
531 <para>Reload one or more units if they support it. If not, stop and then start them instead. This does
532 nothing if the units are not running.</para>
533 <!-- Note that we do not document force-reload here, as that is just compatibility support, and we generally
534 do not document that. -->
535
536 <xi:include href="version-info.xml" xpointer="v229"/>
537 </listitem>
538 </varlistentry>
539 <varlistentry>
540 <term><command>isolate <replaceable>UNIT</replaceable></command></term>
541
542 <listitem>
543 <para>Start the unit specified on the command line and its dependencies
544 and stop all others, unless they have
545 <option>IgnoreOnIsolate=yes</option> (see
546 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
547 If a unit name with no extension is given, an extension of
548 <literal>.target</literal> will be assumed.</para>
549
550 <para>This command is dangerous, since it will immediately stop processes that are not enabled in
551 the new target, possibly including the graphical environment or terminal you are currently using.
552 </para>
553
554 <para>Note that this operation is allowed only on units where
555 <option>AllowIsolate=</option> is enabled. See
556 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
557 for details.</para>
558 </listitem>
559 </varlistentry>
560 <varlistentry>
561 <term><command>kill <replaceable>PATTERN</replaceable>…</command></term>
562
563 <listitem>
564 <para>Send a UNIX process signal to one or more processes of the unit. Use
565 <option>--kill-whom=</option> to select which process to send the signal to. Use
566 <option>--signal=</option> to select the signal to send. Combine with
567 <option>--kill-value=</option> to enqueue a POSIX Realtime Signal with an associated
568 value.</para>
569 </listitem>
570 </varlistentry>
571 <varlistentry>
572 <term><command>clean <replaceable>PATTERN</replaceable>…</command></term>
573
574 <listitem>
575 <para>Remove the configuration, state, cache, logs, runtime or file descriptor store data of the specified units. Use
576 <option>--what=</option> to select which kind of resource to remove. For service units this may
577 be used to remove the directories configured with <varname>ConfigurationDirectory=</varname>,
578 <varname>StateDirectory=</varname>, <varname>CacheDirectory=</varname>,
579 <varname>LogsDirectory=</varname> and <varname>RuntimeDirectory=</varname>, see
580 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>
581 for details. It may also be used to clear the file descriptor store as enabled via
582 <varname>FileDescriptorStoreMax=</varname>, see
583 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
584 for details. For timer units this may be used to clear out the persistent timestamp data if
585 <varname>Persistent=</varname> is used and <option>--what=state</option> is selected, see
586 <citerefentry><refentrytitle>systemd.timer</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
587 command only applies to units that use either of these settings. If <option>--what=</option> is
588 not specified, the cache and runtime data as well as the file descriptor store are removed (as
589 these three types of resources are generally redundant and reproducible on the next invocation of
590 the unit). Multiple values can be separated by commas. Note that the specified units must be stopped
591 to invoke this operation.</para>
592
593 <table>
594 <title>
595 Possible values for <option>--what=</option>
596 </title>
597
598 <tgroup cols='2'>
599 <thead>
600 <row>
601 <entry>Value</entry>
602 <entry>Unit Setting</entry>
603 </row>
604 </thead>
605 <tbody>
606 <row>
607 <entry><literal>runtime</literal></entry>
608 <entry><varname>RuntimeDirectory=</varname></entry>
609 </row>
610 <row>
611 <entry><literal>state</literal></entry>
612 <entry><varname>StateDirectory=</varname></entry>
613 </row>
614 <row>
615 <entry><literal>cache</literal></entry>
616 <entry><varname>CacheDirectory=</varname></entry>
617 </row>
618 <row>
619 <entry><literal>logs</literal></entry>
620 <entry><varname>LogsDirectory=</varname></entry>
621 </row>
622 <row>
623 <entry><literal>configuration</literal></entry>
624 <entry><varname>ConfigurationDirectory=</varname></entry>
625 </row>
626 <row>
627 <entry><literal>fdstore</literal></entry>
628 <entry><varname>FileDescriptorStorePreserve=</varname></entry>
629 </row>
630 <row>
631 <entry><literal>all</literal></entry>
632 <entry>All of the above</entry>
633 </row>
634 <row>
635 <entry><literal>help</literal></entry>
636 <entry>Show the supported values and exit</entry>
637 </row>
638 </tbody>
639 </tgroup>
640 </table>
641
642 <xi:include href="version-info.xml" xpointer="v243"/>
643 </listitem>
644 </varlistentry>
645 <varlistentry>
646 <term><command>freeze <replaceable>PATTERN</replaceable>…</command></term>
647
648 <listitem>
649 <para>Freeze one or more units specified on the
650 command line using cgroup freezer</para>
651
652 <para>Freezing the unit will cause all processes contained within the cgroup corresponding to the unit
653 to be suspended. Being suspended means that unit's processes will not be scheduled to run on CPU until thawed.
654 Note that this command is supported only on systems that use unified cgroup hierarchy. Unit is automatically
655 thawed just before we execute a job against the unit, e.g. before the unit is stopped.</para>
656
657 <xi:include href="version-info.xml" xpointer="v246"/>
658 </listitem>
659 </varlistentry>
660 <varlistentry>
661 <term><command>thaw <replaceable>PATTERN</replaceable>…</command></term>
662
663 <listitem>
664 <para>Thaw (unfreeze) one or more units specified on the
665 command line.</para>
666
667 <para>This is the inverse operation to the <command>freeze</command> command and resumes the execution of
668 processes in the unit's cgroup.</para>
669
670 <xi:include href="version-info.xml" xpointer="v246"/>
671 </listitem>
672 </varlistentry>
673 <varlistentry>
674 <term><command>set-property <replaceable>UNIT</replaceable> <replaceable>PROPERTY</replaceable>=<replaceable>VALUE</replaceable>…</command></term>
675
676 <listitem>
677 <para>Set the specified unit properties at runtime where
678 this is supported. This allows changing configuration
679 parameter properties such as resource control settings at
680 runtime. Not all properties may be changed at runtime, but
681 many resource control settings (primarily those in
682 <citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
683 may. The changes are applied immediately, and stored on disk
684 for future boots, unless <option>--runtime</option> is
685 passed, in which case the settings only apply until the
686 next reboot. The syntax of the property assignment follows
687 closely the syntax of assignments in unit files.</para>
688
689 <para>Example: <command>systemctl set-property foobar.service CPUWeight=200</command></para>
690
691 <para>If the specified unit appears to be inactive, the
692 changes will be only stored on disk as described
693 previously hence they will be effective when the unit will
694 be started.</para>
695
696 <para>Note that this command allows changing multiple properties at the same time, which is
697 preferable over setting them individually.</para>
698
699 <para>Example: <command>systemctl set-property foobar.service CPUWeight=200 MemoryMax=2G IPAccounting=yes</command></para>
700
701 <para>Like with unit file configuration settings, assigning an empty setting usually resets a
702 property to its defaults.</para>
703
704 <para>Example: <command>systemctl set-property avahi-daemon.service IPAddressDeny=</command></para>
705
706 <xi:include href="version-info.xml" xpointer="v206"/>
707 </listitem>
708 </varlistentry>
709
710 <varlistentry>
711 <term>
712 <command>bind</command>
713 <replaceable>UNIT</replaceable>
714 <replaceable>PATH</replaceable>
715 [<replaceable>PATH</replaceable>]
716 </term>
717
718 <listitem><para>Bind-mounts a file or directory from the host into the specified unit's mount
719 namespace. The first path argument is the source file or directory on the host, the second path
720 argument is the destination file or directory in the unit's mount namespace. When the latter is
721 omitted, the destination path in the unit's mount namespace is the same as the source path on the
722 host. When combined with the <option>--read-only</option> switch, a read-only bind mount is
723 created. When combined with the <option>--mkdir</option> switch, the destination path is first
724 created before the mount is applied.</para>
725
726 <para>Note that this option is currently only supported for units that run within a mount namespace
727 (e.g.: with <option>RootImage=</option>, <option>PrivateMounts=</option>, etc.). This command
728 supports bind-mounting directories, regular files, device nodes, <constant>AF_UNIX</constant>
729 socket nodes, as well as FIFOs. The bind mount is ephemeral, and it is undone as soon as the
730 current unit process exists. Note that the namespace mentioned here, where the bind mount will be
731 added to, is the one where the main service process runs. Other processes (those exececuted by
732 <option>ExecReload=</option>, <option>ExecStartPre=</option>, etc.) run in distinct namespaces.
733 </para>
734
735 <para>If supported by the kernel, any prior mount on the selected target will be replaced by the
736 new mount. If not supported, any prior mount will be over-mounted, but remain pinned and
737 inaccessible.</para>
738
739 <xi:include href="version-info.xml" xpointer="v248"/></listitem>
740 </varlistentry>
741
742 <varlistentry>
743 <term>
744 <command>mount-image</command>
745 <replaceable>UNIT</replaceable>
746 <replaceable>IMAGE</replaceable>
747 [<replaceable>PATH</replaceable>
748 [<replaceable>PARTITION_NAME</replaceable>:<replaceable>MOUNT_OPTIONS</replaceable>]]
749 </term>
750
751 <listitem><para>Mounts an image from the host into the specified unit's mount namespace. The first
752 path argument is the source image on the host, the second path argument is the destination
753 directory in the unit's mount namespace (i.e. inside
754 <option>RootImage=</option>/<option>RootDirectory=</option>). The following argument, if any, is
755 interpreted as a colon-separated tuple of partition name and comma-separated list of mount options
756 for that partition. The format is the same as the service <option>MountImages=</option>
757 setting. When combined with the <option>--read-only</option> switch, a ready-only mount is
758 created. When combined with the <option>--mkdir</option> switch, the destination path is first
759 created before the mount is applied.</para>
760
761 <para>Note that this option is currently only supported for units that run within a mount namespace
762 (i.e. with <option>RootImage=</option>, <option>PrivateMounts=</option>, etc.). Note that the
763 namespace mentioned here where the image mount will be added to, is the one where the main service
764 process runs. Note that the namespace mentioned here, where the bind mount will be
765 added to, is the one where the main service process runs. Other processes (those exececuted by
766 <option>ExecReload=</option>, <option>ExecStartPre=</option>, etc.) run in distinct namespaces.
767 </para>
768
769 <para>If supported by the kernel, any prior mount on the selected target will be replaced by the
770 new mount. If not supported, any prior mount will be over-mounted, but remain pinned and
771 inaccessible.</para>
772
773 <para>Example:
774 <programlisting>systemctl mount-image foo.service /tmp/img.raw /var/lib/image root:ro,nosuid</programlisting>
775 <programlisting>systemctl mount-image --mkdir bar.service /tmp/img.raw /var/lib/baz/img</programlisting>
776 </para>
777
778 <xi:include href="version-info.xml" xpointer="v248"/></listitem>
779 </varlistentry>
780
781 <varlistentry>
782 <term><command>service-log-level</command> <replaceable>SERVICE</replaceable> [<replaceable>LEVEL</replaceable>]</term>
783
784 <listitem><para>If the <replaceable>LEVEL</replaceable> argument is not given, print the current
785 log level as reported by service <replaceable>SERVICE</replaceable>.</para>
786
787 <para>If the optional argument <replaceable>LEVEL</replaceable> is provided, then change the
788 current log level of the service to <replaceable>LEVEL</replaceable>. The log level should be a
789 typical syslog log level, i.e. a value in the range 0…7 or one of the strings
790 <constant>emerg</constant>, <constant>alert</constant>, <constant>crit</constant>,
791 <constant>err</constant>, <constant>warning</constant>, <constant>notice</constant>,
792 <constant>info</constant>, <constant>debug</constant>; see <citerefentry
793 project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
794 for details.</para>
795
796 <para>The service must have the appropriate
797 <varname>BusName=<replaceable>destination</replaceable></varname> property and also implement the
798 generic
799 <citerefentry><refentrytitle>org.freedesktop.LogControl1</refentrytitle><manvolnum>5</manvolnum></citerefentry>
800 interface. (<filename>systemctl</filename> will use the generic D-Bus protocol to access the
801 <interfacename>org.freedesktop.LogControl1.LogLevel</interfacename> interface for the D-Bus name
802 <replaceable>destination</replaceable>.)</para>
803
804 <xi:include href="version-info.xml" xpointer="v247"/></listitem>
805 </varlistentry>
806
807 <varlistentry>
808 <term><command>service-log-target</command> <replaceable>SERVICE</replaceable> [<replaceable>TARGET</replaceable>]</term>
809
810 <listitem><para>If the <replaceable>TARGET</replaceable> argument is not given, print the current
811 log target as reported by service <replaceable>SERVICE</replaceable>.</para>
812
813 <para>If the optional argument <replaceable>TARGET</replaceable> is provided, then change the
814 current log target of the service to <replaceable>TARGET</replaceable>. The log target should be
815 one of the strings <constant>console</constant> (for log output to the service's standard error
816 stream), <constant>kmsg</constant> (for log output to the kernel log buffer),
817 <constant>journal</constant> (for log output to
818 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
819 using the native journal protocol), <constant>syslog</constant> (for log output to the classic
820 syslog socket <filename>/dev/log</filename>), <constant>null</constant> (for no log output
821 whatsoever) or <constant>auto</constant> (for an automatically determined choice, typically
822 equivalent to <constant>console</constant> if the service is invoked interactively, and
823 <constant>journal</constant> or <constant>syslog</constant> otherwise).</para>
824
825 <para>For most services, only a small subset of log targets make sense. In particular, most
826 "normal" services should only implement <constant>console</constant>, <constant>journal</constant>,
827 and <constant>null</constant>. Anything else is only appropriate for low-level services that
828 are active in very early boot before proper logging is established.</para>
829
830 <para>The service must have the appropriate
831 <varname>BusName=<replaceable>destination</replaceable></varname> property and also implement the
832 generic
833 <citerefentry><refentrytitle>org.freedesktop.LogControl1</refentrytitle><manvolnum>5</manvolnum></citerefentry>
834 interface. (<filename>systemctl</filename> will use the generic D-Bus protocol to access the
835 <interfacename>org.freedesktop.LogControl1.LogLevel</interfacename> interface for the D-Bus name
836 <replaceable>destination</replaceable>.)</para>
837
838 <xi:include href="version-info.xml" xpointer="v247"/></listitem>
839 </varlistentry>
840
841 <varlistentry>
842 <term><command>reset-failed [<replaceable>PATTERN</replaceable>…]</command></term>
843
844 <listitem>
845 <para>Reset the <literal>failed</literal> state of the specified units, or if no unit name is passed, reset
846 the state of all units. When a unit fails in some way (i.e. process exiting with non-zero error code,
847 terminating abnormally or timing out), it will automatically enter the <literal>failed</literal> state and
848 its exit code and status is recorded for introspection by the administrator until the service is
849 stopped/re-started or reset with this command.</para>
850
851 <para>In addition to resetting the <literal>failed</literal> state of a unit it also resets various other
852 per-unit properties: the start rate limit counter of all unit types is reset to zero, as is the restart
853 counter of service units. Thus, if a unit's start limit (as configured with
854 <varname>StartLimitIntervalSec=</varname>/<varname>StartLimitBurst=</varname>) is hit and the unit refuses
855 to be started again, use this command to make it startable again.</para>
856 </listitem>
857 </varlistentry>
858
859 <varlistentry>
860 <term><command>whoami [<replaceable>PID</replaceable>…]</command></term>
861
862 <listitem><para>Returns the units the processes referenced by the given PIDs belong to (one per
863 line). If no PID is specified returns the unit the <command>systemctl</command> command is invoked
864 in.</para>
865
866 <xi:include href="version-info.xml" xpointer="v254"/></listitem>
867 </varlistentry>
868
869 </variablelist>
870 </refsect2>
871
872 <refsect2>
873 <title>Unit File Commands</title>
874
875 <variablelist>
876 <varlistentry>
877 <term><command>list-unit-files</command> <optional><replaceable>PATTERN…</replaceable></optional></term>
878
879 <listitem>
880 <para>List unit files installed on the system, in combination with their enablement state (as
881 reported by <command>is-enabled</command>). If one or more <replaceable>PATTERN</replaceable>s
882 are specified, only unit files whose name matches one of them are shown (patterns matching unit
883 file system paths are not supported).</para>
884
885 <para>Unlike <command>list-units</command> this command will list template units in addition to
886 explicitly instantiated units.</para>
887
888 <xi:include href="version-info.xml" xpointer="v233"/>
889 </listitem>
890 </varlistentry>
891
892 <varlistentry>
893 <term><command>enable <replaceable>UNIT</replaceable>…</command></term>
894 <term><command>enable <replaceable>PATH</replaceable>…</command></term>
895
896 <listitem>
897 <para>Enable one or more units or unit instances. This will create a set of symlinks, as encoded in the
898 [Install] sections of the indicated unit files. After the symlinks have been created,
899 the system manager configuration is reloaded (in a way equivalent to <command>daemon-reload</command>), in
900 order to ensure the changes are taken into account immediately. Note that this does
901 <emphasis>not</emphasis> have the effect of also starting any of the units being enabled. If this is
902 desired, combine this command with the <option>--now</option> switch, or invoke <command>start</command>
903 with appropriate arguments later. Note that in case of unit instance enablement (i.e. enablement of units of
904 the form <filename>[email protected]</filename>), symlinks named the same as instances are created in the
905 unit configuration directory, however they point to the single template unit file they are instantiated
906 from.</para>
907
908 <para>This command expects either valid unit names (in which case various unit file directories are
909 automatically searched for unit files with appropriate names), or absolute paths to unit files (in which
910 case these files are read directly). If a specified unit file is located outside of the usual unit file
911 directories, an additional symlink is created, linking it into the unit configuration path, thus ensuring
912 it is found when requested by commands such as <command>start</command>. The file system where the linked
913 unit files are located must be accessible when systemd is started (e.g. anything underneath
914 <filename>/home/</filename> or <filename>/var/</filename> is not allowed, unless those directories are
915 located on the root file system).</para>
916
917 <para>This command will print the file system operations executed. This output may be suppressed by passing
918 <option>--quiet</option>.
919 </para>
920
921 <para>Note that this operation creates only the symlinks suggested in the [Install]
922 section of the unit files. While this command is the recommended way to manipulate the unit configuration
923 directory, the administrator is free to make additional changes manually by placing or removing symlinks
924 below this directory. This is particularly useful to create configurations that deviate from the suggested
925 default installation. In this case, the administrator must make sure to invoke
926 <command>daemon-reload</command> manually as necessary, in order to ensure the changes are taken into
927 account.
928 </para>
929
930 <para>When using this operation on units without install information, a warning about it is shown.
931 <option>--no-warn</option> can be used to suppress the warning.</para>
932
933 <para>Enabling units should not be confused with starting (activating) units, as done by the
934 <command>start</command> command. Enabling and starting units is orthogonal: units may be enabled without
935 being started and started without being enabled. Enabling simply hooks the unit into various suggested
936 places (for example, so that the unit is automatically started on boot or when a particular kind of
937 hardware is plugged in). Starting actually spawns the daemon process (in case of service units), or binds
938 the socket (in case of socket units), and so on.</para>
939
940 <para>Depending on whether <option>--system</option>, <option>--user</option>, <option>--runtime</option>,
941 or <option>--global</option> is specified, this enables the unit for the system, for the calling user only,
942 for only this boot of the system, or for all future logins of all users. Note that in the last case, no
943 systemd daemon configuration is reloaded.</para>
944
945 <para>Using <command>enable</command> on masked units is not supported and results in an error.</para>
946 </listitem>
947 </varlistentry>
948
949 <varlistentry>
950 <term><command>disable <replaceable>UNIT</replaceable>…</command></term>
951
952 <listitem>
953 <para>Disables one or more units. This removes all symlinks to the unit files backing the specified units
954 from the unit configuration directory, and hence undoes any changes made by <command>enable</command> or
955 <command>link</command>. Note that this removes <emphasis>all</emphasis> symlinks to matching unit files,
956 including manually created symlinks, and not just those actually created by <command>enable</command> or
957 <command>link</command>. Note that while <command>disable</command> undoes the effect of
958 <command>enable</command>, the two commands are otherwise not symmetric, as <command>disable</command> may
959 remove more symlinks than a prior <command>enable</command> invocation of the same unit created.</para>
960
961 <para>This command expects valid unit names only, it does not accept paths to unit files.</para>
962
963 <para>In addition to the units specified as arguments, all units are disabled that are listed in the
964 <varname>Also=</varname> setting contained in the [Install] section of any of the unit
965 files being operated on.</para>
966
967 <para>This command implicitly reloads the system manager configuration after completing the operation. Note
968 that this command does not implicitly stop the units that are being disabled. If this is desired, either
969 combine this command with the <option>--now</option> switch, or invoke the <command>stop</command> command
970 with appropriate arguments later.</para>
971
972 <para>This command will print information about the file system operations (symlink removals)
973 executed. This output may be suppressed by passing <option>--quiet</option>.
974 </para>
975
976 <para>If a unit gets disabled but its triggering units are still active, a warning containing
977 the names of the triggering units is shown. <option>--no-warn</option> can be used to suppress
978 the warning.</para>
979
980 <para>When this command is used with <option>--user</option>, the units being operated on might
981 still be enabled in global scope, and thus get started automatically even after a successful
982 disablement in user scope. In this case, a warning about it is shown, which can be suppressed
983 using <option>--no-warn</option>.</para>
984
985 <para>This command honors <option>--system</option>, <option>--user</option>, <option>--runtime</option>,
986 <option>--global</option> and <option>--no-warn</option> in a similar way as <command>enable</command>.</para>
987
988 <xi:include href="version-info.xml" xpointer="v238"/>
989 </listitem>
990 </varlistentry>
991
992 <varlistentry>
993 <term><command>reenable <replaceable>UNIT</replaceable>…</command></term>
994
995 <listitem>
996 <para>Reenable one or more units, as specified on the command line. This is a combination of
997 <command>disable</command> and <command>enable</command> and is useful to reset the symlinks a unit file is
998 enabled with to the defaults configured in its [Install] section. This command expects
999 a unit name only, it does not accept paths to unit files.</para>
1000
1001 <para>This command implicitly reloads the system manager configuration after completing the operation.
1002 Note that this command does not implicitly restart the units that are being disabled. If this is
1003 desired, either combine this command with the <option>--now</option> switch, or invoke
1004 the <command>try-restart</command> command with appropriate arguments later.</para>
1005
1006 <xi:include href="version-info.xml" xpointer="v238"/>
1007 </listitem>
1008 </varlistentry>
1009
1010 <varlistentry>
1011 <term><command>preset <replaceable>UNIT</replaceable>…</command></term>
1012
1013 <listitem>
1014 <para>Reset the enable/disable status of one or more unit files, as specified on
1015 the command line, to the defaults configured in the preset policy files. This
1016 has the same effect as <command>disable</command> or
1017 <command>enable</command>, depending how the unit is listed in the preset
1018 files.</para>
1019
1020 <para>Use <option>--preset-mode=</option> to control whether units shall be
1021 enabled and disabled, or only enabled, or only disabled.</para>
1022
1023 <para>If the unit carries no install information, it will be silently ignored
1024 by this command. <replaceable>UNIT</replaceable> must be the real unit name,
1025 any alias names are ignored silently.</para>
1026
1027 <para>For more information on the preset policy format, see
1028 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
1029 </para>
1030
1031 <xi:include href="version-info.xml" xpointer="v238"/>
1032 </listitem>
1033 </varlistentry>
1034
1035 <varlistentry>
1036 <term><command>preset-all</command></term>
1037
1038 <listitem>
1039 <para>Resets all installed unit files to the defaults
1040 configured in the preset policy file (see above).</para>
1041
1042 <para>Use <option>--preset-mode=</option> to control
1043 whether units shall be enabled and disabled, or only
1044 enabled, or only disabled.</para>
1045
1046 <xi:include href="version-info.xml" xpointer="v215"/>
1047 </listitem>
1048 </varlistentry>
1049
1050 <varlistentry>
1051 <term><command>is-enabled <replaceable>UNIT</replaceable>…</command></term>
1052
1053 <listitem>
1054 <para>Checks whether any of the specified unit files are
1055 enabled (as with <command>enable</command>). Returns an
1056 exit code of 0 if at least one is enabled, non-zero
1057 otherwise. Prints the current enable status (see table).
1058 To suppress this output, use <option>--quiet</option>.
1059 To show installation targets, use <option>--full</option>.
1060 </para>
1061
1062 <table>
1063 <title>
1064 <command>is-enabled</command> output
1065 </title>
1066
1067 <tgroup cols='3'>
1068 <thead>
1069 <row>
1070 <entry>Name</entry>
1071 <entry>Description</entry>
1072 <entry>Exit Code</entry>
1073 </row>
1074 </thead>
1075 <tbody>
1076 <row>
1077 <entry><literal>enabled</literal></entry>
1078 <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>
1079 <entry morerows='1'>0</entry>
1080 </row>
1081 <row>
1082 <entry><literal>enabled-runtime</literal></entry>
1083 </row>
1084 <row>
1085 <entry><literal>linked</literal></entry>
1086 <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>
1087 <entry morerows='1'>&gt; 0</entry>
1088 </row>
1089 <row>
1090 <entry><literal>linked-runtime</literal></entry>
1091 </row>
1092 <row>
1093 <entry><literal>alias</literal></entry>
1094 <entry>The name is an alias (symlink to another unit file).</entry>
1095 <entry>0</entry>
1096 </row>
1097 <row>
1098 <entry><literal>masked</literal></entry>
1099 <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>
1100 <entry morerows='1'>&gt; 0</entry>
1101 </row>
1102 <row>
1103 <entry><literal>masked-runtime</literal></entry>
1104 </row>
1105 <row>
1106 <entry><literal>static</literal></entry>
1107 <entry>The unit file is not enabled, and has no provisions for enabling in the [Install] unit file section.</entry>
1108 <entry>0</entry>
1109 </row>
1110 <row>
1111 <entry><literal>indirect</literal></entry>
1112 <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>
1113 <entry>0</entry>
1114 </row>
1115 <row>
1116 <entry><literal>disabled</literal></entry>
1117 <entry>The unit file is not enabled, but contains an [Install] section with installation instructions.</entry>
1118 <entry>&gt; 0</entry>
1119 </row>
1120 <row>
1121 <entry><literal>generated</literal></entry>
1122 <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>
1123 <entry>0</entry>
1124 </row>
1125 <row>
1126 <entry><literal>transient</literal></entry>
1127 <entry>The unit file has been created dynamically with the runtime API. Transient units may not be enabled.</entry>
1128 <entry>0</entry>
1129 </row>
1130 <row>
1131 <entry><literal>bad</literal></entry>
1132 <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>
1133 <entry>&gt; 0</entry>
1134 </row>
1135 <row>
1136 <entry><literal>not-found</literal></entry>
1137 <entry>The unit file does not exist.</entry>
1138 <entry>4</entry>
1139 </row>
1140 </tbody>
1141 </tgroup>
1142 </table>
1143
1144 <xi:include href="version-info.xml" xpointer="v238"/>
1145 </listitem>
1146 </varlistentry>
1147
1148 <varlistentry>
1149 <term><command>mask <replaceable>UNIT</replaceable>…</command></term>
1150
1151 <listitem>
1152 <para>Mask one or more units, as specified on the command line. This will link these unit files
1153 to <filename>/dev/null</filename>, making it impossible to start them. This is a stronger version
1154 of <command>disable</command>, since it prohibits all kinds of activation of the unit, including
1155 enablement and manual activation. Use this option with care. This honors the
1156 <option>--runtime</option> option to only mask temporarily until the next reboot of the
1157 system. The <option>--now</option> option may be used to ensure that the units are also
1158 stopped. This command expects valid unit names only, it does not accept unit file paths.</para>
1159
1160 <para>Note that this will create a symlink under the unit's name in
1161 <filename>/etc/systemd/system/</filename> (in case <option>--runtime</option> is not specified)
1162 or <filename>/run/systemd/system/</filename> (in case <option>--runtime</option> is
1163 specified). If a matching unit file already exists under these directories this operation will
1164 hence fail. This means that the operation is primarily useful to mask units shipped by the vendor
1165 (as those are shipped in <filename>/usr/lib/systemd/system/</filename> and not the aforementioned
1166 two directories), but typically does not work for units created locally (as those are typically
1167 placed precisely in the two aforementioned directories). Similar restrictions apply for
1168 <option>--user</option> mode, in which case the directories are below the user's home directory
1169 however.</para>
1170
1171 <para>If a unit gets masked but its triggering units are still active, a warning containing
1172 the names of the triggering units is shown. <option>--no-warn</option> can be used to suppress
1173 the warning.</para>
1174
1175 <xi:include href="version-info.xml" xpointer="v238"/>
1176 </listitem>
1177 </varlistentry>
1178
1179 <varlistentry>
1180 <term><command>unmask <replaceable>UNIT</replaceable>…</command></term>
1181
1182 <listitem>
1183 <para>Unmask one or more unit files, as specified on the command line. This will undo the effect of
1184 <command>mask</command>. This command expects valid unit names only, it does not accept unit file
1185 paths.</para>
1186
1187 <xi:include href="version-info.xml" xpointer="v238"/>
1188 </listitem>
1189 </varlistentry>
1190
1191 <varlistentry>
1192 <term><command>link <replaceable>PATH</replaceable>…</command></term>
1193
1194 <listitem>
1195 <para>Link a unit file that is not in the unit file search path into the unit file search path. This
1196 command expects an absolute path to a unit file. The effect of this may be undone with
1197 <command>disable</command>. The effect of this command is that a unit file is made available for commands
1198 such as <command>start</command>, even though it is not installed directly in the unit search path. The
1199 file system where the linked unit files are located must be accessible when systemd is started
1200 (e.g. anything underneath <filename>/home/</filename> or <filename>/var/</filename> is not allowed, unless
1201 those directories are located on the root file system).</para>
1202
1203 <xi:include href="version-info.xml" xpointer="v233"/>
1204 </listitem>
1205 </varlistentry>
1206
1207 <varlistentry>
1208 <term><command>revert <replaceable>UNIT</replaceable>…</command></term>
1209
1210 <listitem>
1211 <para>Revert one or more unit files to their vendor versions. This command removes drop-in configuration
1212 files that modify the specified units, as well as any user-configured unit file that overrides a matching
1213 vendor supplied unit file. Specifically, for a unit <literal>foo.service</literal> the matching directories
1214 <literal>foo.service.d/</literal> with all their contained files are removed, both below the persistent and
1215 runtime configuration directories (i.e. below <filename>/etc/systemd/system</filename> and
1216 <filename>/run/systemd/system</filename>); if the unit file has a vendor-supplied version (i.e. a unit file
1217 located below <filename>/usr/</filename>) any matching persistent or runtime unit file that overrides it is
1218 removed, too. Note that if a unit file has no vendor-supplied version (i.e. is only defined below
1219 <filename>/etc/systemd/system</filename> or <filename>/run/systemd/system</filename>, but not in a unit
1220 file stored below <filename>/usr/</filename>), then it is not removed. Also, if a unit is masked, it is
1221 unmasked.</para>
1222
1223 <para>Effectively, this command may be used to undo all changes made with <command>systemctl
1224 edit</command>, <command>systemctl set-property</command> and <command>systemctl mask</command> and puts
1225 the original unit file with its settings back in effect.</para>
1226
1227 <xi:include href="version-info.xml" xpointer="v230"/>
1228 </listitem>
1229 </varlistentry>
1230
1231 <varlistentry>
1232 <term><command>add-wants <replaceable>TARGET</replaceable>
1233 <replaceable>UNIT</replaceable>…</command></term>
1234 <term><command>add-requires <replaceable>TARGET</replaceable>
1235 <replaceable>UNIT</replaceable>…</command></term>
1236
1237 <listitem>
1238 <para>Adds <literal>Wants=</literal> or <literal>Requires=</literal>
1239 dependencies, respectively, to the specified
1240 <replaceable>TARGET</replaceable> for one or more units. </para>
1241
1242 <para>This command honors <option>--system</option>,
1243 <option>--user</option>, <option>--runtime</option> and
1244 <option>--global</option> in a way similar to
1245 <command>enable</command>.</para>
1246
1247 <xi:include href="version-info.xml" xpointer="v217"/>
1248 </listitem>
1249 </varlistentry>
1250
1251 <varlistentry>
1252 <term><command>edit <replaceable>UNIT</replaceable>…</command></term>
1253
1254 <listitem>
1255 <para>Edit or replace a drop-in snippet or the main unit file, to extend or override the
1256 definition of the specified unit.</para>
1257
1258 <para>Depending on whether <option>--system</option> (the default), <option>--user</option>, or
1259 <option>--global</option> is specified, this command will operate on the system unit files, unit
1260 files for the calling user, or the unit files shared between all users.</para>
1261
1262 <para>The editor (see the "Environment" section below) is invoked on temporary files which will
1263 be written to the real location if the editor exits successfully. After the editing is finished,
1264 configuration is reloaded, equivalent to <command>systemctl daemon-reload --system</command> or
1265 <command>systemctl daemon-reload --user</command>. For <command>edit --global</command>, the
1266 reload is not performed and the edits will take effect only for subsequent logins (or after a
1267 reload is requested in a different way).</para>
1268
1269 <para>If <option>--full</option> is specified, a replacement for the main unit file will be
1270 created or edited. Otherwise, a drop-in file will be created or edited.</para>
1271
1272 <para>If <option>--drop-in=</option> is specified, the given drop-in file name
1273 will be used instead of the default <filename>override.conf</filename>.</para>
1274
1275 <para>The unit must exist, i.e. its main unit file must be present. If <option>--force</option>
1276 is specified, this requirement is ignored and a new unit may be created (with
1277 <option>--full</option>), or a drop-in for a nonexistent unit may be created.</para>
1278
1279 <para>If <option>--runtime</option> is specified, the changes will
1280 be made temporarily in <filename>/run/</filename> and they will be
1281 lost on the next reboot.</para>
1282
1283 <para>If <option>--stdin</option> is specified, the new contents will be read from standard
1284 input. In this mode, the old contents of the file are discarded.</para>
1285
1286 <para>If the temporary file is empty upon exit, the modification of
1287 the related unit is canceled.</para>
1288
1289 <para>Note that this command cannot be used to remotely edit units
1290 and that you cannot temporarily edit units which are in
1291 <filename>/etc/</filename>, since they take precedence over
1292 <filename>/run/</filename>.</para>
1293
1294 <xi:include href="version-info.xml" xpointer="v218"/>
1295 </listitem>
1296 </varlistentry>
1297
1298 <varlistentry>
1299 <term><command>get-default</command></term>
1300
1301 <listitem>
1302 <para>Return the default target to boot into. This returns
1303 the target unit name <filename>default.target</filename>
1304 is aliased (symlinked) to.</para>
1305
1306 <xi:include href="version-info.xml" xpointer="v205"/>
1307 </listitem>
1308 </varlistentry>
1309
1310 <varlistentry>
1311 <term><command>set-default <replaceable>TARGET</replaceable></command></term>
1312
1313 <listitem>
1314 <para>Set the default target to boot into. This sets
1315 (symlinks) the <filename>default.target</filename> alias
1316 to the given target unit.</para>
1317
1318 <xi:include href="version-info.xml" xpointer="v205"/>
1319 </listitem>
1320 </varlistentry>
1321
1322 </variablelist>
1323 </refsect2>
1324
1325 <refsect2>
1326 <title>Machine Commands</title>
1327
1328 <variablelist>
1329 <varlistentry>
1330 <term><command>list-machines</command> <optional><replaceable>PATTERN</replaceable>…</optional></term>
1331
1332 <listitem>
1333 <para>List the host and all running local containers with
1334 their state. If one or more
1335 <replaceable>PATTERN</replaceable>s are specified, only
1336 containers matching one of them are shown.
1337 </para>
1338
1339 <xi:include href="version-info.xml" xpointer="v212"/>
1340 </listitem>
1341 </varlistentry>
1342 </variablelist>
1343 </refsect2>
1344
1345 <refsect2>
1346 <title>Job Commands</title>
1347
1348 <variablelist>
1349 <varlistentry>
1350 <term><command>list-jobs <optional><replaceable>PATTERN…</replaceable></optional></command></term>
1351
1352 <listitem>
1353 <para>List jobs that are in progress. If one or more
1354 <replaceable>PATTERN</replaceable>s are specified, only
1355 jobs for units matching one of them are shown.</para>
1356
1357 <para>When combined with <option>--after</option> or <option>--before</option> the list is augmented with
1358 information on which other job each job is waiting for, and which other jobs are waiting for it, see
1359 above.</para>
1360
1361 <xi:include href="version-info.xml" xpointer="v233"/>
1362 </listitem>
1363 </varlistentry>
1364 <varlistentry>
1365 <term><command>cancel <optional><replaceable>JOB</replaceable>…</optional></command></term>
1366
1367 <listitem>
1368 <para>Cancel one or more jobs specified on the command line
1369 by their numeric job IDs. If no job ID is specified, cancel
1370 all pending jobs.</para>
1371
1372 <xi:include href="version-info.xml" xpointer="v233"/>
1373 </listitem>
1374 </varlistentry>
1375 </variablelist>
1376 </refsect2>
1377
1378 <refsect2>
1379 <title>Environment Commands</title>
1380
1381 <para><command>systemd</command> supports an environment block that is passed to processes the manager
1382 spawns. The names of the variables can contain ASCII letters, digits, and the underscore
1383 character. Variable names cannot be empty or start with a digit. In variable values, most characters
1384 are allowed, but the whole sequence must be valid UTF-8. (Note that control characters like newline
1385 (<constant>NL</constant>), tab (<constant>TAB</constant>), or the escape character
1386 (<constant>ESC</constant>), <emphasis>are</emphasis> valid ASCII and thus valid UTF-8). The total
1387 length of the environment block is limited to <constant>_SC_ARG_MAX</constant> value defined by
1388 <citerefentry project='man-pages'><refentrytitle>sysconf</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
1389 </para>
1390
1391 <variablelist>
1392 <varlistentry>
1393 <term><command>show-environment</command></term>
1394
1395 <listitem>
1396 <para>Dump the systemd manager environment block. This is the environment block that is passed to
1397 all processes the manager spawns. The environment block will be dumped in straightforward form
1398 suitable for sourcing into most shells. If no special characters or whitespace is present in the
1399 variable values, no escaping is performed, and the assignments have the form
1400 <literal>VARIABLE=value</literal>. If whitespace or characters which have special meaning to the
1401 shell are present, dollar-single-quote escaping is used, and assignments have the form
1402 <literal>VARIABLE=$'value'</literal>. This syntax is known to be supported by <citerefentry
1403 project='die-net'><refentrytitle>bash</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1404 <citerefentry
1405 project='die-net'><refentrytitle>zsh</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1406 <citerefentry
1407 project='die-net'><refentrytitle>ksh</refentrytitle><manvolnum>1</manvolnum></citerefentry>, and
1408 <citerefentry
1409 project='die-net'><refentrytitle>busybox</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
1410 <citerefentry
1411 project='die-net'><refentrytitle>ash</refentrytitle><manvolnum>1</manvolnum></citerefentry>, but
1412 not <citerefentry
1413 project='die-net'><refentrytitle>dash</refentrytitle><manvolnum>1</manvolnum></citerefentry> or
1414 <citerefentry
1415 project='die-net'><refentrytitle>fish</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
1416 </para>
1417
1418 <para>Note that this shows the <emphasis>effective</emphasis> block, i.e. the combination of
1419 environment variables configured via configuration files, environment generators and via IPC
1420 (i.e. via the <command>set-environment</command> described below). At the moment a unit process
1421 is forked off, this combined environment block will be further combined with per-unit environment
1422 variables, which are not visible in this command.</para>
1423 </listitem>
1424 </varlistentry>
1425 <varlistentry>
1426 <term><command>set-environment <replaceable>VARIABLE=VALUE</replaceable>…</command></term>
1427
1428 <listitem>
1429 <para>Set one or more service manager environment variables, as specified on the command
1430 line. This command will fail if variable names and values do not conform to the rules listed
1431 above.</para>
1432
1433 <para>Note that this operates on an environment block separate from the environment block
1434 configured from service manager configuration and environment generators. Whenever a process is
1435 invoked the two blocks are combined (also incorporating any per-service environment variables),
1436 and passed to it. The <command>show-environment</command> verb will show the combination of the
1437 blocks, see above.</para>
1438
1439 <xi:include href="version-info.xml" xpointer="v233"/>
1440 </listitem>
1441 </varlistentry>
1442 <varlistentry>
1443 <term><command>unset-environment <replaceable>VARIABLE</replaceable>…</command></term>
1444
1445 <listitem>
1446 <para>Unset one or more systemd manager environment variables. If only a variable name is
1447 specified, it will be removed regardless of its value. If a variable and a value are specified,
1448 the variable is only removed if it has the specified value.</para>
1449
1450 <para>Note that this operates on an environment block separate from the environment block
1451 configured from service manager configuration and environment generators. Whenever a process is
1452 invoked the two blocks are combined (also incorporating any per-service environment variables),
1453 and passed to it. The <command>show-environment</command> verb will show the combination of the
1454 blocks, see above. Note that this means this command cannot be used to unset environment
1455 variables defined in the service manager configuration files or via generators.</para>
1456
1457 <xi:include href="version-info.xml" xpointer="v233"/>
1458 </listitem>
1459 </varlistentry>
1460 <varlistentry>
1461 <term>
1462 <command>import-environment</command>
1463 <replaceable>VARIABLE…</replaceable>
1464 </term>
1465
1466 <listitem>
1467 <para>Import all, one or more environment variables set on the client into the systemd manager
1468 environment block. If a list of environment variable names is passed, client-side values are then
1469 imported into the manager's environment block. If any names are not valid environment variable
1470 names or have invalid values according to the rules described above, an error is raised. If no
1471 arguments are passed, the entire environment block inherited by the <command>systemctl</command>
1472 process is imported. In this mode, any inherited invalid environment variables are quietly
1473 ignored.</para>
1474
1475 <para>Importing of the full inherited environment block (calling this command without any
1476 arguments) is deprecated. A shell will set dozens of variables which only make sense locally and
1477 are only meant for processes which are descendants of the shell. Such variables in the global
1478 environment block are confusing to other processes.</para>
1479
1480 <xi:include href="version-info.xml" xpointer="v209"/>
1481 </listitem>
1482 </varlistentry>
1483 </variablelist>
1484 </refsect2>
1485
1486 <refsect2>
1487 <title>Manager State Commands</title>
1488
1489 <variablelist>
1490 <varlistentry>
1491 <term><command>daemon-reload</command></term>
1492
1493 <listitem>
1494 <para>Reload the systemd manager configuration. This will
1495 rerun all generators (see
1496 <citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
1497 reload all unit files, and recreate the entire dependency
1498 tree. While the daemon is being reloaded, all sockets
1499 systemd listens on behalf of user configuration will stay
1500 accessible.</para>
1501
1502 <para>This command should not be confused with the
1503 <command>reload</command> command.</para>
1504 </listitem>
1505 </varlistentry>
1506
1507 <varlistentry>
1508 <term><command>daemon-reexec</command></term>
1509
1510 <listitem>
1511 <para>Reexecute the systemd manager. This will serialize the
1512 manager state, reexecute the process and deserialize the
1513 state again. This command is of little use except for
1514 debugging and package upgrades. Sometimes, it might be
1515 helpful as a heavy-weight <command>daemon-reload</command>.
1516 While the daemon is being reexecuted, all sockets systemd listening
1517 on behalf of user configuration will stay accessible.
1518 </para>
1519 </listitem>
1520 </varlistentry>
1521
1522 <varlistentry id='log-level'>
1523 <term><command>log-level</command> [<replaceable>LEVEL</replaceable>]</term>
1524
1525 <listitem><para>If no argument is given, print the current log level of the manager. If an
1526 optional argument <replaceable>LEVEL</replaceable> is provided, then the command changes the
1527 current log level of the manager to <replaceable>LEVEL</replaceable> (accepts the same values as
1528 <option>--log-level=</option> described in
1529 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
1530 </para>
1531
1532 <xi:include href="version-info.xml" xpointer="v244"/></listitem>
1533 </varlistentry>
1534
1535 <varlistentry>
1536 <term><command>log-target</command> [<replaceable>TARGET</replaceable>]</term>
1537
1538 <listitem><para>If no argument is given, print the current log target of the manager. If an
1539 optional argument <replaceable>TARGET</replaceable> is provided, then the command changes the
1540 current log target of the manager to <replaceable>TARGET</replaceable> (accepts the same values as
1541 <option>--log-target=</option>, described in
1542 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
1543 </para>
1544
1545 <xi:include href="version-info.xml" xpointer="v244"/></listitem>
1546 </varlistentry>
1547
1548 <varlistentry>
1549 <term><command>service-watchdogs</command> [yes|no]</term>
1550
1551 <listitem><para>If no argument is given, print the current state of service runtime watchdogs of
1552 the manager. If an optional boolean argument is provided, then globally enables or disables the
1553 service runtime watchdogs (<option>WatchdogSec=</option>) and emergency actions (e.g.
1554 <option>OnFailure=</option> or <option>StartLimitAction=</option>); see
1555 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
1556 The hardware watchdog is not affected by this setting.</para>
1557
1558 <xi:include href="version-info.xml" xpointer="v244"/></listitem>
1559 </varlistentry>
1560 </variablelist>
1561 </refsect2>
1562
1563 <refsect2>
1564 <title>System Commands</title>
1565
1566 <variablelist>
1567 <varlistentry>
1568 <term><command>is-system-running</command></term>
1569
1570 <listitem>
1571 <para>Checks whether the system is operational. This
1572 returns success (exit code 0) when the system is fully up
1573 and running, specifically not in startup, shutdown or
1574 maintenance mode, and with no failed services. Failure is
1575 returned otherwise (exit code non-zero). In addition, the
1576 current state is printed in a short string to standard
1577 output, see the table below. Use <option>--quiet</option> to
1578 suppress this output.</para>
1579
1580 <para>Use <option>--wait</option> to wait until the boot
1581 process is completed before printing the current state and
1582 returning the appropriate error status. If <option>--wait</option>
1583 is in use, states <varname>initializing</varname> or
1584 <varname>starting</varname> will not be reported, instead
1585 the command will block until a later state (such as
1586 <varname>running</varname> or <varname>degraded</varname>)
1587 is reached.</para>
1588
1589 <table>
1590 <title><command>is-system-running</command> output</title>
1591 <tgroup cols='3'>
1592 <colspec colname='name'/>
1593 <colspec colname='description'/>
1594 <colspec colname='exit-code'/>
1595 <thead>
1596 <row>
1597 <entry>Name</entry>
1598 <entry>Description</entry>
1599 <entry>Exit Code</entry>
1600 </row>
1601 </thead>
1602 <tbody>
1603 <row>
1604 <entry><varname>initializing</varname></entry>
1605 <entry><para>Early bootup, before
1606 <filename>basic.target</filename> is reached
1607 or the <varname>maintenance</varname> state entered.
1608 </para></entry>
1609 <entry>&gt; 0</entry>
1610 </row>
1611 <row>
1612 <entry><varname>starting</varname></entry>
1613 <entry><para>Late bootup, before the job queue
1614 becomes idle for the first time, or one of the
1615 rescue targets are reached.</para></entry>
1616 <entry>&gt; 0</entry>
1617 </row>
1618 <row>
1619 <entry><varname>running</varname></entry>
1620 <entry><para>The system is fully
1621 operational.</para></entry>
1622 <entry>0</entry>
1623 </row>
1624 <row>
1625 <entry><varname>degraded</varname></entry>
1626 <entry><para>The system is operational but one or more
1627 units failed.</para></entry>
1628 <entry>&gt; 0</entry>
1629 </row>
1630 <row>
1631 <entry><varname>maintenance</varname></entry>
1632 <entry><para>The rescue or emergency target is
1633 active.</para></entry>
1634 <entry>&gt; 0</entry>
1635 </row>
1636 <row>
1637 <entry><varname>stopping</varname></entry>
1638 <entry><para>The manager is shutting
1639 down.</para></entry>
1640 <entry>&gt; 0</entry>
1641 </row>
1642 <row>
1643 <entry><varname>offline</varname></entry>
1644 <entry><para>The manager is not
1645 running. Specifically, this is the operational
1646 state if an incompatible program is running as
1647 system manager (PID 1).</para></entry>
1648 <entry>&gt; 0</entry>
1649 </row>
1650 <row>
1651 <entry><varname>unknown</varname></entry>
1652 <entry><para>The operational state could not be
1653 determined, due to lack of resources or another
1654 error cause.</para></entry>
1655 <entry>&gt; 0</entry>
1656 </row>
1657 </tbody>
1658 </tgroup>
1659 </table>
1660
1661 <xi:include href="version-info.xml" xpointer="v215"/>
1662 </listitem>
1663 </varlistentry>
1664
1665 <varlistentry>
1666 <term><command>default</command></term>
1667
1668 <listitem>
1669 <para>Enter default mode. This is equivalent to <command>systemctl isolate default.target</command>. This
1670 operation is blocking by default, use <option>--no-block</option> to request asynchronous behavior.</para>
1671 </listitem>
1672 </varlistentry>
1673
1674 <varlistentry>
1675 <term><command>rescue</command></term>
1676
1677 <listitem>
1678 <para>Enter rescue mode. This is equivalent to <command>systemctl isolate rescue.target</command>. This
1679 operation is blocking by default, use <option>--no-block</option> to request asynchronous behavior.</para>
1680 </listitem>
1681 </varlistentry>
1682 <varlistentry>
1683 <term><command>emergency</command></term>
1684
1685 <listitem>
1686 <para>Enter emergency mode. This is equivalent to <command>systemctl isolate
1687 emergency.target</command>. This operation is blocking by default, use <option>--no-block</option> to
1688 request asynchronous behavior.</para>
1689 </listitem>
1690 </varlistentry>
1691 <varlistentry>
1692 <term><command>halt</command></term>
1693
1694 <listitem>
1695 <para>Shut down and halt the system. This is mostly equivalent to <command>systemctl start halt.target
1696 --job-mode=replace-irreversibly --no-block</command>, but also prints a wall message to all users. This command is
1697 asynchronous; it will return after the halt operation is enqueued, without waiting for it to complete. Note
1698 that this operation will simply halt the OS kernel after shutting down, leaving the hardware powered
1699 on. Use <command>systemctl poweroff</command> for powering off the system (see below).</para>
1700
1701 <para>If combined with <option>--force</option>, shutdown of all running services is skipped, however all
1702 processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the
1703 system halt. If <option>--force</option> is specified twice, the operation is immediately executed without
1704 terminating any processes or unmounting any file systems. This may result in data loss. Note that when
1705 <option>--force</option> is specified twice the halt operation is executed by <command>systemctl</command>
1706 itself, and the system manager is not contacted. This means the command should succeed even when the system
1707 manager has crashed.</para>
1708
1709 <para>If combined with <option>--when=</option>, shutdown will be scheduled after the given timestamp.
1710 And <option>--when=cancel</option> will cancel the shutdown.</para>
1711 </listitem>
1712 </varlistentry>
1713 <varlistentry>
1714 <term><command>poweroff</command></term>
1715
1716 <listitem>
1717 <para>Shut down and power-off the system. This is mostly equivalent to <command>systemctl start
1718 poweroff.target --job-mode=replace-irreversibly --no-block</command>, but also prints a wall message to all
1719 users. This command is asynchronous; it will return after the power-off operation is enqueued, without
1720 waiting for it to complete.</para>
1721
1722 <para>This command honors <option>--force</option> and <option>--when=</option> in a similar way
1723 as <command>halt</command>.</para>
1724 </listitem>
1725 </varlistentry>
1726 <varlistentry>
1727 <term><command>reboot</command></term>
1728
1729 <listitem>
1730 <para>Shut down and reboot the system.</para>
1731
1732 <para>This command is mostly equivalent to <command>systemctl start reboot.target
1733 --job-mode=replace-irreversibly --no-block</command>, but also prints a wall message to all
1734 users. This command is asynchronous; it will return after the reboot operation is enqueued,
1735 without waiting for it to complete.</para>
1736
1737 <para>If the switch <option>--reboot-argument=</option> is given, it will be passed as the optional
1738 argument to the <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
1739 system call.</para>
1740
1741 <para>Options <option>--boot-loader-entry=</option>, <option>--boot-loader-menu=</option>, and
1742 <option>--firmware-setup</option> can be used to select what to do <emphasis>after</emphasis> the
1743 reboot. See the descriptions of those options for details.</para>
1744
1745 <para>This command honors <option>--force</option> and <option>--when=</option> in a similar way
1746 as <command>halt</command>.</para>
1747
1748 <para>If a new kernel has been loaded via <command>kexec --load</command>, a
1749 <command>kexec</command> will be performed instead of a reboot, unless
1750 <literal>SYSTEMCTL_SKIP_AUTO_KEXEC=1</literal> has been set. If a new root file system has
1751 been set up on <literal>/run/nextroot/</literal>, a <command>soft-reboot</command> will be
1752 performed instead of a reboot, unless <literal>SYSTEMCTL_SKIP_AUTO_SOFT_REBOOT=1</literal> has
1753 been set.</para>
1754
1755 <xi:include href="version-info.xml" xpointer="v246"/>
1756 </listitem>
1757 </varlistentry>
1758
1759 <varlistentry>
1760 <term><command>kexec</command></term>
1761
1762 <listitem>
1763 <para>Shut down and reboot the system via <command>kexec</command>. This command will load a
1764 kexec kernel if one was not loaded yet or fail. A kernel may be loaded earlier by a separate step,
1765 this is particularly useful if a custom initrd or additional kernel command line options are
1766 desired. The <option>--force</option> can be used to continue without a kexec kernel, i.e. to
1767 perform a normal reboot. The final reboot step is equivalent to
1768 <command>systemctl start kexec.target --job-mode=replace-irreversibly --no-block</command>.
1769 </para>
1770
1771 <para>To load a kernel, an enumeration is performed following the
1772 <ulink url="https://uapi-group.org/specifications/specs/boot_loader_specification">UAPI.1 Boot Loader Specification</ulink>,
1773 and the default boot entry is loaded. For this step to succeed, the system must be using UEFI
1774 and the boot loader entries must be configured appropriately. <command>bootctl list</command>
1775 may be used to list boot entries, see
1776 <citerefentry><refentrytitle>bootctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
1777 </para>
1778
1779 <para>This command is asynchronous; it will return after the reboot operation is enqueued,
1780 without waiting for it to complete.</para>
1781
1782 <para>This command honors <option>--force</option> and <option>--when=</option> similarly
1783 to <command>halt</command>.</para>
1784
1785 <para>If a new kernel has been loaded via <command>kexec --load</command>, a
1786 <command>kexec</command> will be performed when <command>reboot</command> is invoked, unless
1787 <literal>SYSTEMCTL_SKIP_AUTO_KEXEC=1</literal> has been set.</para>
1788 </listitem>
1789 </varlistentry>
1790
1791 <varlistentry>
1792 <term><command>soft-reboot</command></term>
1793
1794 <listitem>
1795 <para>Shut down and reboot userspace. This is equivalent to <command>systemctl start
1796 soft-reboot.target --job-mode=replace-irreversibly --no-block</command>. This command is
1797 asynchronous; it will return after the reboot operation is enqueued, without waiting for it to
1798 complete.</para>
1799
1800 <para>This command honors <option>--force</option> and <option>--when=</option> in a similar way
1801 as <command>halt</command>.</para>
1802
1803 <para>This operation only reboots userspace, leaving the kernel running. See
1804 <citerefentry><refentrytitle>systemd-soft-reboot.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1805 for details.</para>
1806
1807 <para>If a new root file system has been set up on <literal>/run/nextroot/</literal>, a
1808 <command>soft-reboot</command> will be performed when <command>reboot</command> is invoked,
1809 unless <literal>SYSTEMCTL_SKIP_AUTO_SOFT_REBOOT=1</literal> has been set.</para>
1810
1811 <xi:include href="version-info.xml" xpointer="v254"/>
1812 </listitem>
1813 </varlistentry>
1814
1815 <varlistentry>
1816 <term><command>exit</command> <optional><replaceable>EXIT_CODE</replaceable></optional></term>
1817
1818 <listitem>
1819 <para>Ask the service manager to quit. This is only supported for user service managers (i.e. in
1820 conjunction with the <option>--user</option> option) or in containers and is equivalent to
1821 <command>poweroff</command> otherwise. This command is asynchronous; it will return after the exit
1822 operation is enqueued, without waiting for it to complete.</para>
1823
1824 <para>The service manager will exit with the specified exit code, if
1825 <replaceable>EXIT_CODE</replaceable> is passed.</para>
1826
1827 <xi:include href="version-info.xml" xpointer="v227"/>
1828 </listitem>
1829 </varlistentry>
1830
1831 <varlistentry>
1832 <term><command>switch-root</command> <optional><replaceable>ROOT</replaceable> <optional><replaceable>INIT</replaceable></optional></optional></term>
1833
1834 <listitem>
1835 <para>Switches to a different root directory and executes a new system manager process below it.
1836 This is intended for use in the initrd, and will transition from the initrd's system manager
1837 process (a.k.a. "init" process, PID 1) to the main system manager process which is loaded from
1838 the actual host root files system. This call takes two arguments: the directory that is to become
1839 the new root directory, and the path to the new system manager binary below it to execute as PID
1840 1. If both are omitted or the former is an empty string it defaults to
1841 <filename>/sysroot/</filename>. If the latter is omitted or is an empty string, a systemd binary
1842 will automatically be searched for and used as service manager. If the system manager path is
1843 omitted, equal to the empty string or identical to the path to the systemd binary, the state of
1844 the initrd's system manager process is passed to the main system manager, which allows later
1845 introspection of the state of the services involved in the initrd boot phase.</para>
1846
1847 <xi:include href="version-info.xml" xpointer="v209"/>
1848 </listitem>
1849 </varlistentry>
1850
1851 <varlistentry>
1852 <term><command>sleep</command></term>
1853
1854 <listitem>
1855 <para>Put the system to sleep, through <command>suspend</command>, <command>hibernate</command>,
1856 <command>hybrid-sleep</command>, or <command>suspend-then-hibernate</command>. The sleep operation
1857 to use is automatically selected by <citerefentry>
1858 <refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
1859 By default, <command>suspend-then-hibernate</command> is used, and falls back to <command>suspend</command>
1860 and then <command>hibernate</command> if not supported. Refer to <varname>SleepOperation=</varname>
1861 setting in <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
1862 for more details. This command is asynchronous, and will return after the sleep operation is
1863 successfully enqueued. It will not wait for the sleep/resume cycle to complete.</para>
1864
1865 <xi:include href="version-info.xml" xpointer="v256"/>
1866 </listitem>
1867 </varlistentry>
1868
1869 <varlistentry>
1870 <term><command>suspend</command></term>
1871
1872 <listitem>
1873 <para>Suspend the system. This will trigger activation of the special target unit
1874 <filename>suspend.target</filename>. This command is asynchronous, and will return after the suspend
1875 operation is successfully enqueued. It will not wait for the suspend/resume cycle to complete.</para>
1876
1877 <para>If <option>--force</option> is specified, and <command>systemd-logind</command> returned
1878 error for the operation, the error will be ignored and the operation will be tried again directly
1879 through starting the target unit.</para>
1880 </listitem>
1881 </varlistentry>
1882
1883 <varlistentry>
1884 <term><command>hibernate</command></term>
1885
1886 <listitem>
1887 <para>Hibernate the system. This will trigger activation of the special target unit
1888 <filename>hibernate.target</filename>. This command is asynchronous, and will return after the hibernation
1889 operation is successfully enqueued. It will not wait for the hibernate/thaw cycle to complete.</para>
1890
1891 <para>This command honors <option>--force</option> in the same way as <command>suspend</command>.</para>
1892 </listitem>
1893 </varlistentry>
1894
1895 <varlistentry>
1896 <term><command>hybrid-sleep</command></term>
1897
1898 <listitem>
1899 <para>Hibernate and suspend the system. This will trigger activation of the special target unit
1900 <filename>hybrid-sleep.target</filename>. This command is asynchronous, and will return after the hybrid
1901 sleep operation is successfully enqueued. It will not wait for the sleep/wake-up cycle to complete.</para>
1902
1903 <para>This command honors <option>--force</option> in the same way as <command>suspend</command>.</para>
1904
1905 <xi:include href="version-info.xml" xpointer="v196"/>
1906 </listitem>
1907 </varlistentry>
1908
1909 <varlistentry>
1910 <term><command>suspend-then-hibernate</command></term>
1911
1912 <listitem>
1913 <para>Suspend the system and hibernate it when the battery is low, or when the delay specified
1914 in <filename>systemd-sleep.conf</filename> elapsed. This will trigger activation of the special
1915 target unit <filename>suspend-then-hibernate.target</filename>. This command is asynchronous,
1916 and will return after the hybrid sleep operation is successfully enqueued.
1917 It will not wait for the sleep/wake-up or hibernate/thaw cycle to complete.</para>
1918
1919 <para>This command honors <option>--force</option> in the same way as <command>suspend</command>.</para>
1920
1921 <xi:include href="version-info.xml" xpointer="v240"/>
1922 </listitem>
1923 </varlistentry>
1924 </variablelist>
1925 </refsect2>
1926
1927 <refsect2>
1928 <title>Parameter Syntax</title>
1929
1930 <para>Unit commands listed above take either a single unit name (designated as <replaceable>UNIT</replaceable>),
1931 or multiple unit specifications (designated as <replaceable>PATTERN</replaceable>…). In the first case, the
1932 unit name with or without a suffix must be given. If the suffix is not specified (unit name is "abbreviated"),
1933 systemctl will append a suitable suffix, <literal>.service</literal> by default, and a type-specific suffix in
1934 case of commands which operate only on specific unit types. For example,
1935 <programlisting># systemctl start sshd</programlisting> and
1936 <programlisting># systemctl start sshd.service</programlisting>
1937 are equivalent, as are
1938 <programlisting># systemctl isolate default</programlisting>
1939 and
1940 <programlisting># systemctl isolate default.target</programlisting>
1941 Note that (absolute) paths to device nodes are automatically converted to device unit names, and other (absolute)
1942 paths to mount unit names.
1943 <programlisting># systemctl status /dev/sda
1944 # systemctl status /home</programlisting>
1945 are equivalent to:
1946 <programlisting># systemctl status dev-sda.device
1947 # systemctl status home.mount</programlisting>
1948 In the second case, shell-style globs will be matched against the primary names of all units currently in memory;
1949 literal unit names, with or without a suffix, will be treated as in the first case. This means that literal unit
1950 names always refer to exactly one unit, but globs may match zero units and this is not considered an
1951 error.</para>
1952
1953 <para>Glob patterns use
1954 <citerefentry project='man-pages'><refentrytitle>fnmatch</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1955 so normal shell-style globbing rules are used, and
1956 <literal>*</literal>, <literal>?</literal>,
1957 <literal>[]</literal> may be used. See
1958 <citerefentry project='man-pages'><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1959 for more details. The patterns are matched against the primary names of
1960 units currently in memory, and patterns which do not match anything
1961 are silently skipped. For example:
1962 <programlisting># systemctl stop "sshd@*.service"</programlisting>
1963 will stop all <filename>[email protected]</filename> instances. Note that alias names of units, and units that are not
1964 in memory are not considered for glob expansion.
1965 </para>
1966
1967 <para>For unit file commands, the specified <replaceable>UNIT</replaceable> should be the name of the unit file
1968 (possibly abbreviated, see above), or the absolute path to the unit file:
1969 <programlisting># systemctl enable foo.service</programlisting>
1970 or
1971 <programlisting># systemctl link /path/to/foo.service</programlisting>
1972 </para>
1973 </refsect2>
1974
1975 </refsect1>
1976
1977 <refsect1>
1978 <title>Options</title>
1979
1980 <para>The following options are understood:</para>
1981
1982 <variablelist>
1983 <varlistentry>
1984 <term><option>-t</option></term>
1985 <term><option>--type=</option></term>
1986
1987 <listitem>
1988 <para>The argument is a comma-separated list of unit types such as <option>service</option> and
1989 <option>socket</option>. When units are listed with <command>list-units</command>,
1990 <command>list-dependencies</command>, <command>show</command>, or <command>status</command>,
1991 only units of the specified types will be shown. By default, units of all types are shown.
1992 Use <option>--type=</option> to reset the filter.</para>
1993
1994 <para>As a special case, if one of the arguments is <option>help</option>, a list of allowed values
1995 will be printed and the program will exit.</para>
1996 </listitem>
1997 </varlistentry>
1998
1999 <varlistentry>
2000 <term><option>--state=</option></term>
2001
2002 <listitem>
2003 <para>The argument is a comma-separated list of unit LOAD, SUB, or ACTIVE states. When listing
2004 units with <command>list-units</command>, <command>list-dependencies</command>,
2005 <command>show</command> or <command>status</command>, show only those in the specified states. Use
2006 <option>--state=failed</option> or <option>--failed</option> to show only failed units. Use
2007 <option>--state=</option> to reset the filter.</para>
2008
2009 <para>As a special case, if one of the arguments is <option>help</option>, a list of allowed values
2010 will be printed and the program will exit.</para>
2011
2012 <xi:include href="version-info.xml" xpointer="v206"/>
2013 </listitem>
2014 </varlistentry>
2015
2016 <varlistentry>
2017 <term><option>-p</option></term>
2018 <term><option>--property=</option></term>
2019
2020 <listitem>
2021 <para>When showing unit/job/manager properties with the
2022 <command>show</command> command, limit display to properties
2023 specified in the argument. The argument should be a
2024 comma-separated list of property names, such as
2025 <literal>MainPID</literal>. Unless specified, all known
2026 properties are shown. If specified more than once, all
2027 properties with the specified names are shown. Shell
2028 completion is implemented for property names.</para>
2029
2030 <para>For the manager itself,
2031 <command>systemctl show</command>
2032 will show all available properties, most of which are derived or closely match the options described in
2033 <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
2034 </para>
2035
2036 <para>Properties for units vary by unit type, so showing any
2037 unit (even a non-existent one) is a way to list properties
2038 pertaining to this type. Similarly, showing any job will list
2039 properties pertaining to all jobs. Properties for units are
2040 documented in
2041 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2042 and the pages for individual unit types
2043 <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2044 <citerefentry><refentrytitle>systemd.socket</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2045 etc.</para>
2046 </listitem>
2047 </varlistentry>
2048
2049 <varlistentry>
2050 <term><option>-P</option></term>
2051
2052 <listitem>
2053 <xi:include href="standard-options.xml" xpointer="xpointer(//varlistentry[@id='option-P']/listitem/para)" />
2054 <xi:include href="version-info.xml" xpointer="v246"/>
2055 </listitem>
2056 </varlistentry>
2057
2058 <varlistentry>
2059 <term><option>-a</option></term>
2060 <term><option>--all</option></term>
2061
2062 <listitem>
2063 <para>When listing units with <command>list-units</command>, also show inactive units and
2064 units which are following other units. When showing unit/job/manager properties, show all
2065 properties regardless whether they are set or not.</para>
2066
2067 <para>To list all units installed in the file system, use the
2068 <command>list-unit-files</command> command instead.</para>
2069
2070 <para>When listing units with <command>list-dependencies</command>, recursively show
2071 dependencies of all dependent units (by default only dependencies of target units are
2072 shown).</para>
2073
2074 <para>When used with <command>status</command>, show journal messages in full, even if they include
2075 unprintable characters or are very long. By default, fields with unprintable characters are
2076 abbreviated as "blob data". (Note that the pager may escape unprintable characters again.)</para>
2077 </listitem>
2078 </varlistentry>
2079
2080 <varlistentry>
2081 <term><option>-r</option></term>
2082 <term><option>--recursive</option></term>
2083
2084 <listitem>
2085 <para>When listing units, also show units of local
2086 containers. Units of local containers will be prefixed with
2087 the container name, separated by a single colon character
2088 (<literal>:</literal>).</para>
2089
2090 <xi:include href="version-info.xml" xpointer="v212"/>
2091 </listitem>
2092 </varlistentry>
2093
2094 <varlistentry>
2095 <term><option>--reverse</option></term>
2096
2097 <listitem>
2098 <para>Show reverse dependencies between units with
2099 <command>list-dependencies</command>, i.e. follow
2100 dependencies of type <varname>WantedBy=</varname>,
2101 <varname>RequiredBy=</varname>, <varname>UpheldBy=</varname>,
2102 <varname>PartOf=</varname>, <varname>BoundBy=</varname>,
2103 instead of <varname>Wants=</varname> and similar.
2104 </para>
2105
2106 <xi:include href="version-info.xml" xpointer="v203"/>
2107 </listitem>
2108 </varlistentry>
2109
2110 <varlistentry>
2111 <term><option>--after</option></term>
2112
2113 <listitem>
2114 <para>With <command>list-dependencies</command>, show the
2115 units that are ordered before the specified unit. In other
2116 words, recursively list units following the
2117 <varname>After=</varname> dependency.</para>
2118
2119 <para>Note that any <varname>After=</varname> dependency is
2120 automatically mirrored to create a
2121 <varname>Before=</varname> dependency. Temporal dependencies
2122 may be specified explicitly, but are also created implicitly
2123 for units which are <varname>WantedBy=</varname> targets
2124 (see
2125 <citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
2126 and as a result of other directives (for example
2127 <varname>RequiresMountsFor=</varname>). Both explicitly
2128 and implicitly introduced dependencies are shown with
2129 <command>list-dependencies</command>.</para>
2130
2131 <para>When passed to the <command>list-jobs</command> command, for each printed job show which other jobs are
2132 waiting for it. May be combined with <option>--before</option> to show both the jobs waiting for each job as
2133 well as all jobs each job is waiting for.</para>
2134
2135 <xi:include href="version-info.xml" xpointer="v203"/>
2136 </listitem>
2137 </varlistentry>
2138
2139 <varlistentry>
2140 <term><option>--before</option></term>
2141
2142 <listitem>
2143 <para>With <command>list-dependencies</command>, show the
2144 units that are ordered after the specified unit. In other
2145 words, recursively list units following the
2146 <varname>Before=</varname> dependency.</para>
2147
2148 <para>When passed to the <command>list-jobs</command> command, for each printed job show which other jobs it
2149 is waiting for. May be combined with <option>--after</option> to show both the jobs waiting for each job as
2150 well as all jobs each job is waiting for.</para>
2151
2152 <xi:include href="version-info.xml" xpointer="v212"/>
2153 </listitem>
2154 </varlistentry>
2155
2156 <varlistentry>
2157 <term><option>--with-dependencies</option></term>
2158
2159 <listitem>
2160 <para>When used with <command>status</command>,
2161 <command>cat</command>, <command>list-units</command>, and
2162 <command>list-unit-files</command>, those commands print all
2163 specified units and the dependencies of those units.</para>
2164
2165 <para>Options <option>--reverse</option>,
2166 <option>--after</option>, <option>--before</option>
2167 may be used to change what types of dependencies
2168 are shown.</para>
2169
2170 <xi:include href="version-info.xml" xpointer="v245"/>
2171 </listitem>
2172 </varlistentry>
2173
2174 <varlistentry>
2175 <term><option>-l</option></term>
2176 <term><option>--full</option></term>
2177
2178 <listitem>
2179 <para>Do not ellipsize unit names, process tree entries,
2180 journal output, or truncate unit descriptions in the output
2181 of <command>status</command>, <command>list-units</command>,
2182 <command>list-jobs</command>, and
2183 <command>list-timers</command>.</para>
2184 <para>Also, show installation targets in the output of
2185 <command>is-enabled</command>.</para>
2186 </listitem>
2187 </varlistentry>
2188
2189 <varlistentry>
2190 <term><option>--value</option></term>
2191
2192 <listitem>
2193 <para>When printing properties with <command>show</command>, only print the value, and skip the
2194 property name and <literal>=</literal>. Also see option <option>-P</option> above.</para>
2195
2196 <xi:include href="version-info.xml" xpointer="v230"/>
2197 </listitem>
2198 </varlistentry>
2199
2200 <varlistentry>
2201 <term><option>--show-types</option></term>
2202
2203 <listitem>
2204 <para>When showing sockets, show the type of the socket.</para>
2205
2206 <xi:include href="version-info.xml" xpointer="v202"/>
2207 </listitem>
2208 </varlistentry>
2209
2210 <varlistentry>
2211 <term><option>--job-mode=</option></term>
2212
2213 <listitem>
2214 <para>When queuing a new job, this option controls how to deal with
2215 already queued jobs. It takes one of <literal>fail</literal>,
2216 <literal>lenient</literal>,
2217 <literal>replace</literal>,
2218 <literal>replace-irreversibly</literal>,
2219 <literal>isolate</literal>,
2220 <literal>ignore-dependencies</literal>,
2221 <literal>ignore-requirements</literal>,
2222 <literal>flush</literal>,
2223 <literal>triggering</literal>, or
2224 <literal>restart-dependencies</literal>. Defaults to
2225 <literal>replace</literal>, except when the
2226 <command>isolate</command> command is used which implies the
2227 <literal>isolate</literal> job mode.</para>
2228
2229 <para>If <literal>fail</literal> is specified and a requested operation on weak dependencies
2230 conflicts with a pending job (more specifically: causes an already pending start job to be reversed
2231 into a stop job or vice versa), cause the operation to fail.</para>
2232
2233 <para>If <literal>lenient</literal> is specified and a requested operation conflicts with any
2234 active/activating unit, cause the operation to fail.</para>
2235
2236 <para>If <literal>replace</literal> (the default) is
2237 specified, any conflicting pending job will be replaced, as
2238 necessary.</para>
2239
2240 <para>If <literal>replace-irreversibly</literal> is specified,
2241 operate like <literal>replace</literal>, but also mark the new
2242 jobs as irreversible. This prevents future conflicting
2243 transactions from replacing these jobs (or even being enqueued
2244 while the irreversible jobs are still pending). Irreversible
2245 jobs can still be cancelled using the <command>cancel</command>
2246 command. This job mode should be used on any transaction which
2247 pulls in <filename>shutdown.target</filename>.</para>
2248
2249 <para><literal>isolate</literal> is only valid for start
2250 operations and causes all other units to be stopped when the
2251 specified unit is started. This mode is always used when the
2252 <command>isolate</command> command is used.</para>
2253
2254 <para><literal>flush</literal> will cause all queued jobs to
2255 be canceled when the new job is enqueued.</para>
2256
2257 <para>If <literal>ignore-dependencies</literal> is specified,
2258 then all unit dependencies are ignored for this new job and
2259 the operation is executed immediately. If passed, no required
2260 units of the unit passed will be pulled in, and no ordering
2261 dependencies will be honored. This is mostly a debugging and
2262 rescue tool for the administrator and should not be used by
2263 applications.</para>
2264
2265 <para><literal>ignore-requirements</literal> is similar to
2266 <literal>ignore-dependencies</literal>, but only causes the
2267 requirement dependencies to be ignored, the ordering
2268 dependencies will still be honored.</para>
2269
2270 <para><literal>triggering</literal> may only be used with
2271 <command>systemctl stop</command>. In this mode, the specified
2272 unit and any active units that trigger it are stopped. See the
2273 discussion of
2274 <varname>Triggers=</varname> in <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
2275 for more information about triggering units.</para>
2276
2277 <para><literal>restart-dependencies</literal> may only be used with
2278 <command>systemctl start</command>. In this mode, dependencies of
2279 the specified unit will receive restart propagation, as if a restart
2280 job had been enqueued for the unit.</para>
2281
2282 <xi:include href="version-info.xml" xpointer="v209"/>
2283 </listitem>
2284 </varlistentry>
2285
2286 <varlistentry>
2287 <term><option>-T</option></term>
2288 <term><option>--show-transaction</option></term>
2289
2290 <listitem>
2291 <para>When enqueuing a unit job (for example as effect of a <command>systemctl start</command>
2292 invocation or similar), show brief information about all jobs enqueued, covering both the requested
2293 job and any added because of unit dependencies. Note that the output will only include jobs
2294 immediately part of the transaction requested. It is possible that service start-up program code
2295 run as effect of the enqueued jobs might request further jobs to be pulled in. This means that
2296 completion of the listed jobs might ultimately entail more jobs than the listed ones.</para>
2297
2298 <xi:include href="version-info.xml" xpointer="v242"/>
2299 </listitem>
2300 </varlistentry>
2301
2302 <varlistentry>
2303 <term><option>--fail</option></term>
2304
2305 <listitem>
2306 <para>Shorthand for <option>--job-mode=</option>fail.</para>
2307 <para>When used with the <command>kill</command> command,
2308 if no units were killed, the operation results in an error.
2309 </para>
2310
2311 <xi:include href="version-info.xml" xpointer="v227"/>
2312 </listitem>
2313 </varlistentry>
2314
2315 <varlistentry>
2316 <term><option>--check-inhibitors=</option></term>
2317
2318 <listitem>
2319 <para>When system shutdown or sleep state is requested, this option controls checking of inhibitor
2320 locks. It takes one of <literal>auto</literal>, <literal>yes</literal>, and <literal>no</literal>.
2321 Defaults to <literal>auto</literal>, which means logind will perform the check and respect active
2322 inhibitor locks, but <command>systemctl</command> will only do a client-side check for interactive
2323 invocations (i.e. from a TTY), so that a more friendly and informative error can be returned to
2324 users. <literal>no</literal> disables the checks both in <command>systemctl</command> and
2325 <citerefentry><refentrytitle>systemd-logind</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
2326 </para>
2327
2328 <para>Applications can establish inhibitor locks to prevent certain important operations (such as
2329 CD burning) from being interrupted by system shutdown or sleep. Any user may take these locks and
2330 privileged users may override these locks. If any locks are taken, shutdown and sleep state
2331 requests will normally fail (unless explicitly overridden with <literal>no</literal>).</para>
2332
2333 <para>Option <option>--force</option> provides another way to override inhibitors.</para>
2334
2335 <xi:include href="version-info.xml" xpointer="v248"/>
2336 </listitem>
2337 </varlistentry>
2338
2339 <varlistentry>
2340 <term><option>-i</option></term>
2341
2342 <listitem>
2343 <para>Shortcut for <option>--check-inhibitors=no</option>.</para>
2344
2345 <xi:include href="version-info.xml" xpointer="v198"/>
2346 </listitem>
2347 </varlistentry>
2348
2349 <varlistentry>
2350 <term><option>--dry-run</option></term>
2351
2352 <listitem>
2353 <para>Just print what would be done. Currently supported by verbs
2354 <command>halt</command>, <command>poweroff</command>, <command>reboot</command>,
2355 <command>kexec</command>, <command>suspend</command>, <command>hibernate</command>,
2356 <command>hybrid-sleep</command>, <command>suspend-then-hibernate</command>,
2357 <command>default</command>, <command>rescue</command>,
2358 <command>emergency</command>, and <command>exit</command>.</para>
2359
2360 <xi:include href="version-info.xml" xpointer="v236"/>
2361 </listitem>
2362 </varlistentry>
2363
2364 <varlistentry>
2365 <term><option>-q</option></term>
2366 <term><option>--quiet</option></term>
2367
2368 <listitem>
2369 <para>Suppress printing of the results of various commands
2370 and also the hints about truncated log lines. This does not
2371 suppress output of commands for which the printed output is
2372 the only result (like <command>show</command>). Errors are
2373 always printed.</para>
2374 </listitem>
2375 </varlistentry>
2376
2377 <varlistentry>
2378 <term><option>-v</option></term>
2379 <term><option>--verbose</option></term>
2380
2381 <listitem>
2382 <para>Display unit log output while executing unit operations.</para>
2383
2384 <xi:include href="version-info.xml" xpointer="v258"/>
2385 </listitem>
2386 </varlistentry>
2387
2388 <varlistentry>
2389 <term><option>--no-warn</option></term>
2390
2391 <listitem>
2392 <para>Do not generate the warnings shown by default in the following cases:
2393 <itemizedlist>
2394 <listitem>
2395 <para>when <command>systemctl</command> is invoked without procfs mounted on
2396 <filename>/proc/</filename>,</para>
2397 </listitem>
2398 <listitem>
2399 <para>when using <command>enable</command> or <command>disable</command> on units without
2400 install information (i.e. do not have or have an empty [Install] section),</para>
2401 </listitem>
2402 <listitem>
2403 <para>when using <command>disable</command> combined with <option>--user</option> on units
2404 that are enabled in global scope,</para>
2405 </listitem>
2406 <listitem>
2407 <para>when a <command>stop</command>-ped, <command>disable</command>-d, or <command>mask</command>-ed
2408 unit still has active triggering units,</para>
2409 </listitem>
2410 <listitem>
2411 <para>when a unit file is changed and requires <command>daemon-reload</command>.</para>
2412 </listitem>
2413 </itemizedlist>
2414 </para>
2415
2416 <xi:include href="version-info.xml" xpointer="v253"/>
2417 </listitem>
2418 </varlistentry>
2419
2420 <varlistentry>
2421 <term><option>--no-block</option></term>
2422
2423 <listitem>
2424 <para>Do not synchronously wait for the requested operation
2425 to finish. If this is not specified, the job will be
2426 verified, enqueued and <command>systemctl</command> will
2427 wait until the unit's start-up is completed. By passing this
2428 argument, it is only verified and enqueued. This option may not be
2429 combined with <option>--wait</option>.</para>
2430 </listitem>
2431 </varlistentry>
2432
2433 <varlistentry>
2434 <term><option>--wait</option></term>
2435
2436 <listitem>
2437 <para>When used with <command>start</command> or <command>restart</command>, synchronously wait for
2438 started units to terminate again. This option may not be combined with <option>--no-block</option>.
2439 Note that this will wait forever if any given unit never terminates (by itself or by getting
2440 stopped explicitly); particularly services which use <literal>RemainAfterExit=yes</literal>.</para>
2441
2442 <para>When used with <command>is-system-running</command>, wait until the boot process is completed
2443 before returning.</para>
2444
2445 <para>When used with <command>kill</command>, wait until the signalled units terminate. Note that
2446 this will wait forever if any given unit never terminates.</para>
2447
2448 <xi:include href="version-info.xml" xpointer="v232"/>
2449 </listitem>
2450 </varlistentry>
2451
2452 <xi:include href="user-system-options.xml" xpointer="user" />
2453 <xi:include href="user-system-options.xml" xpointer="system" />
2454
2455 <varlistentry>
2456 <term><option>--failed</option></term>
2457
2458 <listitem>
2459 <para>List units in failed state. This is equivalent to
2460 <option>--state=failed</option>.</para>
2461
2462 <xi:include href="version-info.xml" xpointer="v233"/>
2463 </listitem>
2464 </varlistentry>
2465
2466 <varlistentry>
2467 <term><option>--no-wall</option></term>
2468
2469 <listitem>
2470 <para>Do not send wall message before halt, power-off and reboot.</para>
2471 </listitem>
2472 </varlistentry>
2473
2474 <varlistentry>
2475 <term><option>--global</option></term>
2476
2477 <listitem>
2478 <para>When used with <command>enable</command> and
2479 <command>disable</command>, operate on the global user
2480 configuration directory, thus enabling or disabling a unit
2481 file globally for all future logins of all users.</para>
2482 </listitem>
2483 </varlistentry>
2484
2485 <varlistentry>
2486 <term><option>--no-reload</option></term>
2487
2488 <listitem>
2489 <para>When used with <command>enable</command>, <command>disable</command>, <command>preset</command>,
2490 <command>mask</command>, or <command>unmask</command>, do not implicitly reload daemon configuration
2491 after executing the changes.</para>
2492 </listitem>
2493 </varlistentry>
2494
2495 <varlistentry>
2496 <term><option>--kill-whom=</option></term>
2497
2498 <listitem>
2499 <para>When used with <command>kill</command>, choose which processes to send a UNIX process signal
2500 to. Must be one of <option>main</option>, <option>control</option>, <option>cgroup</option> or
2501 <option>all</option> to select whether to kill only the main process, the control process, all
2502 processes in the unit's control group or all processes of the unit. The main process of the unit is
2503 the one that defines the life-time of it. A control process of a unit is one that is invoked by the
2504 manager to induce state changes of it. For example, all processes started due to the
2505 <varname>ExecStartPre=</varname>, <varname>ExecStop=</varname> or <varname>ExecReload=</varname>
2506 settings of service units are control processes. Note that there is only one control process per
2507 unit at a time, as only one state change is executed at a time. For services of type
2508 <varname>Type=forking</varname>, the initial process started by the manager for
2509 <varname>ExecStart=</varname> is a control process, while the process ultimately forked off by that
2510 one is then considered the main process of the unit (if it can be determined). This is different
2511 for service units of other types, where the process forked off by the manager for
2512 <varname>ExecStart=</varname> is always the main process itself. A service unit consists of zero or
2513 one main process, zero or one control process plus any number of additional processes part of the
2514 unit's control group. Not all unit types manage processes of these types however. For example, for
2515 mount units, control processes are defined (which are the invocations of
2516 <filename>&MOUNT_PATH;</filename> and <filename>&UMOUNT_PATH;</filename>), but no main process is
2517 defined. If omitted, defaults to <option>all</option>, except if <option>--kill-subgroup=</option>
2518 is used in which case defaults to <option>cgroup</option>.</para>
2519
2520 <xi:include href="version-info.xml" xpointer="v252"/>
2521 </listitem>
2522 </varlistentry>
2523
2524 <varlistentry>
2525 <term><option>--kill-value=<replaceable>INT</replaceable></option></term>
2526
2527 <listitem><para>If used with the <command>kill</command> command, enqueues a signal along with the
2528 specified integer value parameter to the specified process(es). This operation is only available for
2529 POSIX Realtime Signals (i.e. <option>--signal=SIGRTMIN+…</option> or
2530 <option>--signal=SIGRTMAX-…</option>), and ensures the signals are generated via the <citerefentry
2531 project='man-pages'><refentrytitle>sigqueue</refentrytitle><manvolnum>3</manvolnum></citerefentry>
2532 system call, rather than <citerefentry
2533 project='man-pages'><refentrytitle>kill</refentrytitle><manvolnum>3</manvolnum></citerefentry>. The
2534 specified value must be a 32-bit signed integer, and may be specified either in decimal, in
2535 hexadecimal (if prefixed with <literal>0x</literal>), octal (if prefixed with <literal>0o</literal>)
2536 or binary (if prefixed with <literal>0b</literal>)</para>
2537
2538 <para>If this option is used the signal will only be enqueued on the control or main process of the
2539 unit, never on other processes belonging to the unit, i.e. <option>--kill-whom=all</option> will only
2540 affect main and control processes but no other processes.</para>
2541
2542 <xi:include href="version-info.xml" xpointer="v254"/></listitem>
2543 </varlistentry>
2544
2545 <varlistentry>
2546 <term><option>--kill-subgroup=<replaceable>PATH</replaceable></option></term>
2547
2548 <listitem><para>Takes a control group sub-path to send signals to, for use with the
2549 <command>kill</command> command. By default the chosen signal is delivered to all processes of the
2550 unit's cgroups (as well as the main/control processes (if outside) – subject to
2551 <option>--kill-whom=</option>). But with this option a subgroup can be selelected instead. This
2552 functionality is only available if <literal>cgroup</literal> or <literal>cgroup-fail</literal> are
2553 used with <option>--kill-whom=</option>, and in fact the former is the default if
2554 <option>--kill-subgroup=</option> is used.</para>
2555
2556 <para>The specified path may, but doesn't have to be prefixed with a slash, and its absence or
2557 presence has no effect, the path is either way taken relative to the unit's main control group
2558 path.</para>
2559
2560 <para>This functionality is only available on units where control group delegation is enabled (see
2561 <varname>Delegate=</varname> in
2562 <member><citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>).</para>
2563
2564 <xi:include href="version-info.xml" xpointer="v258"/></listitem>
2565 </varlistentry>
2566
2567 <xi:include href="standard-options.xml" xpointer="signal" />
2568
2569 <varlistentry>
2570 <term><option>--what=</option></term>
2571
2572 <listitem>
2573 <para>Select what type of per-unit resources to remove when the <command>clean</command> command is
2574 invoked, see above. Takes one of <constant>configuration</constant>, <constant>state</constant>,
2575 <constant>cache</constant>, <constant>logs</constant>, <constant>runtime</constant>,
2576 <constant>fdstore</constant> to select the type of resource. This option may be specified more than
2577 once, in which case all specified resource types are removed. Also accepts the special value
2578 <constant>all</constant> as a shortcut for specifying all six resource types. If this option is not
2579 specified defaults to the combination of <constant>cache</constant>, <constant>runtime</constant>
2580 and <constant>fdstore</constant>, i.e. the three kinds of resources that are generally considered
2581 to be redundant and can be reconstructed on next invocation. The empty argument can be used to
2582 reset to this default.</para>
2583
2584 <para>Note that the explicit removal of the <constant>fdstore</constant> resource type is only
2585 useful if the <varname>FileDescriptorStorePreserve=</varname> option is enabled, since the file
2586 descriptor store is otherwise cleaned automatically when the unit is stopped.</para>
2587
2588 <xi:include href="version-info.xml" xpointer="v243"/>
2589 </listitem>
2590 </varlistentry>
2591
2592 <varlistentry>
2593 <term><option>-f</option></term>
2594 <term><option>--force</option></term>
2595
2596 <listitem>
2597 <para>When used with <command>enable</command>, overwrite any existing conflicting symlinks.</para>
2598
2599 <para>When used with <command>edit</command>, create all of the specified units which do not already exist.</para>
2600
2601 <para>When used with <command>suspend</command>, <command>hibernate</command>, <command>hybrid-sleep</command>,
2602 or <command>suspend-then-hibernate</command>, the error returned by <command>systemd-logind</command>
2603 will be ignored, and the operation will be performed directly through starting the corresponding units.
2604 </para>
2605
2606 <para>When used with <command>halt</command>, <command>poweroff</command>, <command>reboot</command>,
2607 or <command>kexec</command>, execute the selected operation without shutting down all units. However,
2608 all processes will be killed forcibly and all file systems are unmounted or remounted read-only.
2609 This is hence a drastic but relatively safe option to request an immediate reboot. If <option>--force</option>
2610 is specified twice for these operations (with the exception of <command>kexec</command>), they will
2611 be executed immediately, without terminating any processes or unmounting any file systems.</para>
2612
2613 <warning>
2614 <para>Specifying <option>--force</option> twice with any of these operations might result in data loss.
2615 Note that when <option>--force</option> is specified twice the selected operation is executed by
2616 <command>systemctl</command> itself, and the system manager is not contacted. This means the command
2617 should succeed even when the system manager has crashed.</para>
2618 </warning>
2619 </listitem>
2620 </varlistentry>
2621
2622 <varlistentry>
2623 <term><option>--message=</option></term>
2624
2625 <listitem>
2626 <para>When used with <command>halt</command>, <command>poweroff</command> or <command>reboot</command>, set a
2627 short message explaining the reason for the operation. The message will be logged together with the default
2628 shutdown message.</para>
2629
2630 <xi:include href="version-info.xml" xpointer="v225"/>
2631 </listitem>
2632 </varlistentry>
2633
2634 <varlistentry>
2635 <term><option>--now</option></term>
2636
2637 <listitem>
2638 <para>When used with <command>enable</command>, <command>disable</command>, <command>mask</command>,
2639 or <command>reenable</command>, also start/stop/try-restart the units after the specified
2640 unit file operations succeed.</para>
2641
2642 <xi:include href="version-info.xml" xpointer="v220"/>
2643 </listitem>
2644 </varlistentry>
2645
2646 <varlistentry>
2647 <term><option>--root=</option></term>
2648
2649 <listitem>
2650 <para>When used with
2651 <command>enable</command>/<command>disable</command>/<command>is-enabled</command>
2652 (and related commands), use the specified root path when looking for unit
2653 files. If this option is present, <command>systemctl</command> will operate on
2654 the file system directly, instead of communicating with the <command>systemd</command>
2655 daemon to carry out changes.</para>
2656 </listitem>
2657
2658 </varlistentry>
2659
2660 <varlistentry>
2661 <term><option>--image=<replaceable>image</replaceable></option></term>
2662
2663 <listitem><para>Takes a path to a disk image file or block device node. If specified, all operations
2664 are applied to file system in the indicated disk image. This option is similar to
2665 <option>--root=</option>, but operates on file systems stored in disk images or block devices. The
2666 disk image should either contain just a file system or a set of file systems within a GPT partition
2667 table, following the <ulink url="https://uapi-group.org/specifications/specs/discoverable_partitions_specification">UAPI.2 Discoverable Partitions
2668 Specification</ulink>. For further information on supported disk images, see
2669 <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
2670 switch of the same name.</para>
2671
2672 <xi:include href="version-info.xml" xpointer="v252"/></listitem>
2673 </varlistentry>
2674
2675 <xi:include href="standard-options.xml" xpointer="image-policy-open" />
2676
2677 <varlistentry>
2678 <term><option>--runtime</option></term>
2679
2680 <listitem>
2681 <para>When used with <command>enable</command>,
2682 <command>disable</command>, <command>edit</command>,
2683 (and related commands), make changes only temporarily, so
2684 that they are lost on the next reboot. This will have the
2685 effect that changes are not made in subdirectories of
2686 <filename>/etc/</filename> but in <filename>/run/</filename>,
2687 with identical immediate effects, however, since the latter
2688 is lost on reboot, the changes are lost too.</para>
2689
2690 <para>Similarly, when used with
2691 <command>set-property</command>, make changes only
2692 temporarily, so that they are lost on the next
2693 reboot.</para>
2694 </listitem>
2695 </varlistentry>
2696
2697 <varlistentry>
2698 <term><option>--preset-mode=</option></term>
2699
2700 <listitem>
2701 <para>Takes one of <literal>full</literal> (the default),
2702 <literal>enable-only</literal>,
2703 <literal>disable-only</literal>. When used with the
2704 <command>preset</command> or <command>preset-all</command>
2705 commands, controls whether units shall be disabled and
2706 enabled according to the preset rules, or only enabled, or
2707 only disabled.</para>
2708
2709 <xi:include href="version-info.xml" xpointer="v215"/>
2710 </listitem>
2711 </varlistentry>
2712
2713 <varlistentry>
2714 <term><option>-n</option></term>
2715 <term><option>--lines=</option></term>
2716
2717 <listitem>
2718 <para>When used with <command>status</command>, controls the number of journal lines to show,
2719 counting from the most recent ones. Takes a positive integer argument, or 0 to disable journal
2720 output. Defaults to 10.</para>
2721 </listitem>
2722 </varlistentry>
2723
2724 <varlistentry>
2725 <term><option>-o</option></term>
2726 <term><option>--output=</option></term>
2727
2728 <listitem>
2729 <para>When used with <command>status</command>, controls the
2730 formatting of the journal entries that are shown. For the
2731 available choices, see
2732 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
2733 Defaults to <literal>short</literal>.</para>
2734 </listitem>
2735 </varlistentry>
2736
2737 <varlistentry>
2738 <term><option>--firmware-setup</option></term>
2739
2740 <listitem>
2741 <para>When used with the <command>reboot</command>, <command>poweroff</command>, or
2742 <command>halt</command> command, indicate to the system's firmware to reboot into the firmware
2743 setup interface for the next boot. Note that this functionality is not available on all systems.
2744 </para>
2745
2746 <xi:include href="version-info.xml" xpointer="v220"/>
2747 </listitem>
2748 </varlistentry>
2749
2750 <varlistentry>
2751 <term><option>--boot-loader-menu=<replaceable>timeout</replaceable></option></term>
2752
2753 <listitem>
2754 <para>When used with the <command>reboot</command>, <command>poweroff</command>, or
2755 <command>halt</command> command, indicate to the system's boot loader to show the boot loader menu
2756 on the following boot. Takes a time value as parameter — indicating the menu timeout. Pass zero
2757 in order to disable the menu timeout. Note that not all boot loaders support this functionality.
2758 </para>
2759
2760 <xi:include href="version-info.xml" xpointer="v242"/>
2761 </listitem>
2762 </varlistentry>
2763
2764 <varlistentry>
2765 <term><option>--boot-loader-entry=<replaceable>ID</replaceable></option></term>
2766
2767 <listitem>
2768 <para>When used with the <command>reboot</command>, <command>poweroff</command>, or
2769 <command>halt</command> command, indicate to the system's boot loader to boot into a specific
2770 boot loader entry on the following boot. Takes a boot loader entry identifier as argument,
2771 or <literal>help</literal> in order to list available entries. Note that not all boot loaders
2772 support this functionality.</para>
2773
2774 <xi:include href="version-info.xml" xpointer="v242"/>
2775 </listitem>
2776 </varlistentry>
2777
2778 <varlistentry>
2779 <term><option>--reboot-argument=</option></term>
2780
2781 <listitem>
2782 <para>This switch is used with <command>reboot</command>. The value is architecture and firmware
2783 specific. As an example, <literal>recovery</literal> might be used to trigger system recovery, and
2784 <literal>fota</literal> might be used to trigger a <quote>firmware over the air</quote>
2785 update.</para>
2786
2787 <xi:include href="version-info.xml" xpointer="v246"/>
2788 </listitem>
2789 </varlistentry>
2790
2791 <varlistentry>
2792 <term><option>--kernel-cmdline=</option></term>
2793
2794 <listitem>
2795 <para>When used with <command>kexec</command>, append the specified string to the kernel command
2796 line options of the kexec kernel. The kernel command line is taken from the boot loader entry of
2797 the currently booted kernel (as selected automatically when no kexec kernel is preloaded, see
2798 <command>kexec</command> above). This string is appended verbatim, separated from the existing
2799 options by a single space. <command>systemctl kexec</command> will fail if this option is specified
2800 when a kexec kernel is already loaded.</para>
2801
2802 <xi:include href="version-info.xml" xpointer="v261"/>
2803 </listitem>
2804 </varlistentry>
2805
2806 <varlistentry>
2807 <term><option>--plain</option></term>
2808
2809 <listitem>
2810 <para>When used with <command>list-dependencies</command>,
2811 <command>list-units</command> or <command>list-machines</command>,
2812 the output is printed as a list instead of a tree, and the bullet
2813 circles are omitted.</para>
2814
2815 <xi:include href="version-info.xml" xpointer="v203"/>
2816 </listitem>
2817 </varlistentry>
2818
2819 <varlistentry>
2820 <term><option>--timestamp=</option></term>
2821
2822 <listitem>
2823 <para>Change the format of printed timestamps. The following values may be used:
2824 </para>
2825
2826 <variablelist>
2827 <varlistentry>
2828 <term><option>pretty</option> (this is the default)</term>
2829 <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS TZ</literal></para>
2830
2831 <xi:include href="version-info.xml" xpointer="v248"/></listitem>
2832 </varlistentry>
2833 </variablelist>
2834
2835 <variablelist>
2836 <varlistentry>
2837 <term><option>unix</option></term>
2838 <listitem><para><literal>@seconds-since-the-epoch</literal></para>
2839
2840 <xi:include href="version-info.xml" xpointer="v251"/></listitem>
2841 </varlistentry>
2842 </variablelist>
2843
2844 <variablelist>
2845 <varlistentry>
2846 <term><option>us</option></term>
2847 <term><option>μs</option></term>
2848 <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS.UUUUUU TZ</literal></para>
2849
2850 <xi:include href="version-info.xml" xpointer="v248"/></listitem>
2851 </varlistentry>
2852 </variablelist>
2853
2854 <variablelist>
2855 <varlistentry>
2856 <term><option>utc</option></term>
2857 <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS UTC</literal></para>
2858
2859 <xi:include href="version-info.xml" xpointer="v248"/></listitem>
2860 </varlistentry>
2861 </variablelist>
2862
2863 <variablelist>
2864 <varlistentry>
2865 <term><option>us+utc</option></term>
2866 <term><option>μs+utc</option></term>
2867 <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS.UUUUUU UTC</literal></para>
2868
2869 <xi:include href="version-info.xml" xpointer="v248"/></listitem>
2870 </varlistentry>
2871 </variablelist>
2872
2873 <xi:include href="version-info.xml" xpointer="v247"/>
2874 </listitem>
2875 </varlistentry>
2876
2877 <varlistentry>
2878 <term><option>--mkdir</option></term>
2879
2880 <listitem><para>When used with <command>bind</command>, creates the destination file or directory before
2881 applying the bind mount. Note that even though the name of this option suggests that it is suitable only for
2882 directories, this option also creates the destination file node to mount over if the object to mount is not
2883 a directory, but a regular file, device node, socket or FIFO.</para>
2884
2885 <xi:include href="version-info.xml" xpointer="v248"/></listitem>
2886 </varlistentry>
2887
2888 <varlistentry>
2889 <term><option>--read-only</option></term>
2890
2891 <listitem><para>When used with <command>bind</command>, creates a read-only bind mount.</para>
2892
2893 <xi:include href="version-info.xml" xpointer="v248"/>
2894 </listitem>
2895 </varlistentry>
2896
2897 <varlistentry>
2898 <term><option>--drop-in=<replaceable>NAME</replaceable></option></term>
2899
2900 <listitem><para>When used with <command>edit</command>, use <replaceable>NAME</replaceable> as the
2901 drop-in file name instead of <filename>override.conf</filename>.</para>
2902
2903 <xi:include href="version-info.xml" xpointer="v253"/>
2904 </listitem>
2905 </varlistentry>
2906
2907 <varlistentry>
2908 <term><option>--when=</option></term>
2909
2910 <listitem>
2911 <para>When used with <command>halt</command>, <command>poweroff</command>, <command>reboot</command>
2912 or <command>kexec</command>, schedule the action to be performed at the given timestamp,
2913 which should adhere to the syntax documented in <citerefentry
2914 project='man-pages'><refentrytitle>systemd.time</refentrytitle><manvolnum>7</manvolnum></citerefentry>
2915 section "PARSING TIMESTAMPS". Specially, if <literal>show</literal> is given, the currently scheduled
2916 action will be shown, which can be canceled by passing an empty string or <literal>cancel</literal>.
2917 <literal>auto</literal> will schedule the action according to maintenance window or one minute in
2918 the future.</para>
2919
2920 <xi:include href="version-info.xml" xpointer="v254"/>
2921 </listitem>
2922 </varlistentry>
2923
2924 <varlistentry>
2925 <term><option>--stdin</option></term>
2926
2927 <listitem>
2928 <para>When used with <command>edit</command>, the contents of the file will be read from standard
2929 input and the editor will not be launched. In this mode, the old contents of the file are
2930 completely replaced. This is useful to "edit" unit files from scripts:</para>
2931
2932 <programlisting>$ systemctl edit --drop-in=limits.conf --stdin some-service.service &lt;&lt;EOF
2933 [Unit]
2934 AllowedCPUs=7,11
2935 EOF
2936 </programlisting>
2937
2938 <para>Multiple drop-ins may be "edited" in this mode; the same contents will be written to all of
2939 them.</para>
2940
2941 <xi:include href="version-info.xml" xpointer="v256"/>
2942 </listitem>
2943 </varlistentry>
2944
2945 <xi:include href="user-system-options.xml" xpointer="host" />
2946 <xi:include href="user-system-options.xml" xpointer="machine" />
2947 <xi:include href="user-system-options.xml" xpointer="capsule" />
2948
2949 <xi:include href="standard-options.xml" xpointer="no-ask-password" />
2950 <xi:include href="standard-options.xml" xpointer="no-pager" />
2951 <xi:include href="standard-options.xml" xpointer="legend" />
2952 <xi:include href="standard-options.xml" xpointer="help" />
2953 <xi:include href="standard-options.xml" xpointer="version" />
2954 </variablelist>
2955 </refsect1>
2956
2957 <refsect1>
2958 <title>Exit status</title>
2959
2960 <para>On success, 0 is returned, a non-zero failure code otherwise.</para>
2961
2962 <para><command>systemctl</command> uses the return codes defined by LSB, as defined in
2963 <ulink url="http://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/iniscrptact.html">LSB 3.0.0</ulink>.
2964 </para>
2965
2966 <table>
2967 <title>LSB return codes</title>
2968
2969 <tgroup cols='3'>
2970 <thead>
2971 <row>
2972 <entry>Value</entry>
2973 <entry>Description in LSB</entry>
2974 <entry>Use in systemd</entry>
2975 </row>
2976 </thead>
2977 <tbody>
2978 <row>
2979 <entry><constant>0</constant></entry>
2980 <entry>"program is running or service is OK"</entry>
2981 <entry>unit is active</entry>
2982 </row>
2983 <row>
2984 <entry><constant>1</constant></entry>
2985 <entry>"program is dead and <filename>/var/run</filename> pid file exists"</entry>
2986 <entry>unit <emphasis>not</emphasis> failed (used by <command>is-failed</command>)</entry>
2987 </row>
2988 <row>
2989 <entry><constant>2</constant></entry>
2990 <entry>"program is dead and <filename>/var/lock</filename> lock file exists"</entry>
2991 <entry>unused</entry>
2992 </row>
2993 <row>
2994 <entry><constant>3</constant></entry>
2995 <entry>"program is not running"</entry>
2996 <entry>unit is not active</entry>
2997 </row>
2998 <row>
2999 <entry><constant>4</constant></entry>
3000 <entry>"program or service status is unknown"</entry>
3001 <entry>no such unit</entry>
3002 </row>
3003 </tbody>
3004 </tgroup>
3005 </table>
3006
3007 <para>The mapping of LSB service states to systemd unit states is imperfect, so it is better to
3008 not rely on those return values but to look for specific unit states and substates instead.
3009 </para>
3010 </refsect1>
3011
3012 <refsect1>
3013 <title>Environment</title>
3014
3015 <variablelist class='environment-variables'>
3016 <varlistentry>
3017 <term><varname>$SYSTEMD_EDITOR</varname></term>
3018
3019 <listitem><para>Editor to use when editing units; overrides
3020 <varname>$EDITOR</varname> and <varname>$VISUAL</varname>. If neither
3021 <varname>$SYSTEMD_EDITOR</varname> nor <varname>$EDITOR</varname> nor
3022 <varname>$VISUAL</varname> are present or if it is set to an empty
3023 string or if their execution failed, systemctl will try to execute well
3024 known editors in this order:
3025 <citerefentry project='die-net'><refentrytitle>editor</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
3026 <citerefentry project='die-net'><refentrytitle>nano</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
3027 <citerefentry project='die-net'><refentrytitle>vim</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
3028 <citerefentry project='die-net'><refentrytitle>vi</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
3029 </para>
3030
3031 <xi:include href="version-info.xml" xpointer="v218"/></listitem>
3032 </varlistentry>
3033 <xi:include href="common-variables.xml" xpointer="log-level"/>
3034 <xi:include href="common-variables.xml" xpointer="log-color"/>
3035 <xi:include href="common-variables.xml" xpointer="log-time"/>
3036 <xi:include href="common-variables.xml" xpointer="log-location"/>
3037 <xi:include href="common-variables.xml" xpointer="log-target"/>
3038 <xi:include href="common-variables.xml" xpointer="pager"/>
3039 <xi:include href="common-variables.xml" xpointer="less"/>
3040 <xi:include href="common-variables.xml" xpointer="lesscharset"/>
3041 <xi:include href="common-variables.xml" xpointer="lesssecure"/>
3042 <xi:include href="common-variables.xml" xpointer="colors"/>
3043 <xi:include href="common-variables.xml" xpointer="urlify"/>
3044 </variablelist>
3045 </refsect1>
3046
3047 <refsect1>
3048 <title>See Also</title>
3049 <para><simplelist type="inline">
3050 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
3051 <member><citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
3052 <member><citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
3053 <member><citerefentry><refentrytitle>machinectl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
3054 <member><citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
3055 <member><citerefentry><refentrytitle>systemd.resource-control</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
3056 <member><citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
3057 <member><citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
3058 <member><citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
3059 <member><citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
3060 <member><citerefentry project='man-pages'><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
3061 </simplelist></para>
3062 </refsect1>
3063
3064 </refentry>