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