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