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