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