2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM
"custom-entities.ent" >
7 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
9 <refentry id=
"systemctl"
10 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
13 <title>systemctl
</title>
14 <productname>systemd
</productname>
18 <refentrytitle>systemctl
</refentrytitle>
19 <manvolnum>1</manvolnum>
23 <refname>systemctl
</refname>
24 <refpurpose>Control the systemd system and service manager
</refpurpose>
29 <command>systemctl
</command>
30 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
31 <arg choice=
"plain">COMMAND
</arg>
32 <arg choice=
"opt" rep=
"repeat">UNIT
</arg>
37 <title>Description
</title>
39 <para><command>systemctl
</command> may be used to introspect and
40 control the state of the
<literal>systemd
</literal> system and
41 service manager. Please refer to
42 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
43 for an introduction into the basic concepts and functionality this
48 <title>Commands
</title>
50 <para>The following commands are understood:
</para>
53 <title>Unit Commands (Introspection and Modification)
</title>
57 <term><command>list-units
</command> <optional><replaceable>PATTERN
</replaceable>…
</optional></term>
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>
68 <para>Note that this command does not show unit templates, but only instances of unit
69 templates. Units templates that aren't instantiated are not runnable, and will thus never show up
70 in the output of this command. Specifically this means that
<filename>foo@.service
</filename>
71 will never be shown in this list — unless instantiated, e.g. as
72 <filename>foo@bar.service
</filename>. Use
<command>list-unit-files
</command> (see below) for
73 listing installed unit template files.
</para>
75 <para>Produces output similar to
76 <programlisting> UNIT LOAD ACTIVE SUB DESCRIPTION
77 sys-module-fuse.device loaded active plugged /sys/module/fuse
78 -.mount loaded active mounted Root Mount
79 boot-efi.mount loaded active mounted /boot/efi
80 systemd-journald.service loaded active running Journal Service
81 systemd-logind.service loaded active running Login Service
82 ● user@
1000.service loaded failed failed User Manager for UID
1000
84 systemd-tmpfiles-clean.timer loaded active waiting Daily Cleanup of Temporary Directories
86 LOAD = Reflects whether the unit definition was properly loaded.
87 ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
88 SUB = The low-level unit activation state, values depend on unit type.
90 123 loaded units listed. Pass --all to see loaded but inactive units, too.
91 To show all installed unit files use 'systemctl list-unit-files'.
</programlisting></para>
93 <para>The header and the last unit of a given type are underlined if the terminal supports
94 that. A colored dot is shown next to services which were masked, not found, or otherwise
97 <para>The LOAD column shows the load state, one of
<constant>loaded
</constant>,
98 <constant>not-found
</constant>,
<constant>bad-setting
</constant>,
<constant>error
</constant>,
99 <constant>masked
</constant>. The ACTIVE columns shows the general unit state, one of
100 <constant>active
</constant>,
<constant>reloading
</constant>,
<constant>inactive
</constant>,
101 <constant>failed
</constant>,
<constant>activating
</constant>,
<constant>deactivating
</constant>. The SUB
102 column shows the unit-type-specific detailed state of the unit, possible values vary by unit type. The list
103 of possible LOAD, ACTIVE, and SUB states is not constant and new systemd releases may both add and remove
104 values.
<programlisting>systemctl --state=help
</programlisting> command may be used to display the
105 current set of possible values.
</para>
107 <para>This is the default command.
</para>
112 <term><command>list-automounts
</command> <optional><replaceable>PATTERN
</replaceable>…
</optional></term>
115 <para>List automount units currently in memory, ordered by mount path. If one or more
116 <replaceable>PATTERN
</replaceable>s are specified, only automount units matching one of them are shown.
117 Produces output similar to
119 WHAT WHERE MOUNTED IDLE TIMEOUT UNIT
120 /dev/sdb1 /mnt/test no
120s mnt-test.automount
121 binfmt_misc /proc/sys/fs/binfmt_misc yes
0 proc-sys-fs-binfmt_misc.automount
123 2 automounts listed.
</programlisting>
126 <para>Also see
<option>--show-types
</option>,
<option>--all
</option>, and
<option>--state=
</option>.
</para>
128 <xi:include href=
"version-info.xml" xpointer=
"v252"/>
133 <term><command>list-paths
</command> <optional><replaceable>PATTERN
</replaceable>…
</optional></term>
136 <para>List path units currently in memory, ordered by path. If one or more
137 <replaceable>PATTERN
</replaceable>s are specified, only path units matching one of them are shown.
138 Produces output similar to
140 PATH CONDITION UNIT ACTIVATES
141 /run/systemd/ask-password DirectoryNotEmpty systemd-ask-password-plymouth.path systemd-ask-password-plymouth.service
142 /run/systemd/ask-password DirectoryNotEmpty systemd-ask-password-wall.path systemd-ask-password-wall.service
143 /var/cache/cups/org.cups.cupsd PathExists cups.path cups.service
145 3 paths listed.
</programlisting>
148 <para>Also see
<option>--show-types
</option>,
<option>--all
</option>, and
<option>--state=
</option>.
</para>
150 <xi:include href=
"version-info.xml" xpointer=
"v254"/>
155 <term><command>list-sockets
</command> <optional><replaceable>PATTERN
</replaceable>…
</optional></term>
158 <para>List socket units currently in memory, ordered by listening address. If one or more
159 <replaceable>PATTERN
</replaceable>s are specified, only socket units matching one of them are
160 shown. Produces output similar to
162 LISTEN UNIT ACTIVATES
163 /dev/initctl systemd-initctl.socket systemd-initctl.service
165 [::]:
22 sshd.socket sshd.service
166 kobject-uevent
1 systemd-udevd-kernel.socket systemd-udevd.service
168 5 sockets listed.
</programlisting>
169 Note: because the addresses might contains spaces, this output
170 is not suitable for programmatic consumption.
173 <para>Also see
<option>--show-types
</option>,
<option>--all
</option>, and
<option>--state=
</option>.
</para>
175 <xi:include href=
"version-info.xml" xpointer=
"v202"/>
180 <term><command>list-timers
</command> <optional><replaceable>PATTERN
</replaceable>…
</optional></term>
183 <para>List timer units currently in memory, ordered by the time they elapse next. If one or more
184 <replaceable>PATTERN
</replaceable>s are specified, only units matching one of them are shown.
185 Produces output similar to
187 NEXT LEFT LAST PASSED UNIT ACTIVATES
188 - - Thu
2017-
02-
23 13:
40:
29 EST
3 days ago ureadahead-stop.timer ureadahead-stop.service
189 Sun
2017-
02-
26 18:
55:
42 EST
1min
14s left Thu
2017-
02-
23 13:
54:
44 EST
3 days ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
190 Sun
2017-
02-
26 20:
37:
16 EST
1h
42min left Sun
2017-
02-
26 11:
56:
36 EST
6h ago apt-daily.timer apt-daily.service
191 Sun
2017-
02-
26 20:
57:
49 EST
2h
3min left Sun
2017-
02-
26 11:
56:
36 EST
6h ago snapd.refresh.timer snapd.refresh.service
195 <para><emphasis>NEXT
</emphasis> shows the next time the timer will run.
</para>
196 <para><emphasis>LEFT
</emphasis> shows how long till the next time the timer runs.
</para>
197 <para><emphasis>LAST
</emphasis> shows the last time the timer ran.
</para>
198 <para><emphasis>PASSED
</emphasis> shows how long has passed since the timer last ran.
</para>
199 <para><emphasis>UNIT
</emphasis> shows the name of the timer
</para>
200 <para><emphasis>ACTIVATES
</emphasis> shows the name the service the timer activates when it runs.
</para>
202 <para>Also see
<option>--all
</option> and
<option>--state=
</option>.
</para>
204 <xi:include href=
"version-info.xml" xpointer=
"v209"/>
209 <term><command>is-active
<replaceable>PATTERN
</replaceable>…
</command></term>
212 <para>Check whether any of the specified units are active
213 (i.e. running). Returns an exit code
214 <constant>0</constant> if at least one is active, or
215 non-zero otherwise. Unless
<option>--quiet
</option> is
216 specified, this will also print the current unit state to
217 standard output.
</para>
222 <term><command>is-failed
<replaceable>PATTERN
</replaceable>…
</command></term>
225 <para>Check whether any of the specified units are in a
226 "failed" state. Returns an exit code
227 <constant>0</constant> if at least one has failed,
228 non-zero otherwise. Unless
<option>--quiet
</option> is
229 specified, this will also print the current unit state to
230 standard output.
</para>
232 <xi:include href=
"version-info.xml" xpointer=
"v197"/>
237 <term><command>status
</command> <optional><replaceable>PATTERN
</replaceable>…|
<replaceable>PID
</replaceable>…]
</optional></term>
240 <para>Show runtime status information about the whole system or about one or more units followed
241 by most recent log data from the journal. If no positional arguments are specified, and no unit
242 filter is given with
<option>--type=
</option>,
<option>--state=
</option>, or
243 <option>--failed
</option>, shows the status of the whole system. If combined with
244 <option>--all
</option>, follows that with the status of all units. If positional arguments are
245 specified, each positional argument is treated as either a unit name to show, or a glob pattern
246 to show units whose names match that pattern, or a PID to show the unit containing that PID. When
247 <option>--type=
</option>,
<option>--state=
</option>, or
<option>--failed
</option> are used, units
248 are additionally filtered by the TYPE and ACTIVE state.
</para>
250 <para>This function is intended to generate human-readable output. If you are looking for
251 computer-parsable output, use
<command>show
</command> instead. By default, this function only
252 shows
10 lines of output and ellipsizes lines to fit in the terminal window. This can be changed
253 with
<option>--lines
</option> and
<option>--full
</option>, see above. In addition,
254 <command>journalctl --unit=
<replaceable>NAME
</replaceable></command> or
<command>journalctl
255 --user-unit=
<replaceable>NAME
</replaceable></command> use a similar filter for messages and might
256 be more convenient.
</para>
258 <para>Note that this operation only displays
<emphasis>runtime
</emphasis> status, i.e. information about
259 the current invocation of the unit (if it is running) or the most recent invocation (if it is not
260 running anymore, and has not been released from memory). Information about earlier invocations,
261 invocations from previous system boots, or prior invocations that have already been released from
262 memory may be retrieved via
<command>journalctl --unit=
</command>.
</para>
264 <para>systemd implicitly loads units as necessary, so just running the
<command>status
</command>
265 will attempt to load a file. The command is thus not useful for determining if something was
266 already loaded or not. The units may possibly also be quickly unloaded after the operation is
267 completed if there's no reason to keep it in memory thereafter.
</para>
270 <title>Example output from systemctl status
</title>
272 <programlisting>$ systemctl status bluetooth
273 ● bluetooth.service - Bluetooth service
274 Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: enabled)
275 Active: active (running) since Wed
2017-
01-
04 13:
54:
04 EST;
1 weeks
0 days ago
276 Docs: man:bluetoothd(
8)
277 Main PID:
930 (bluetoothd)
282 CGroup: /system.slice/bluetooth.service
283 └─
930 /usr/lib/bluetooth/bluetoothd
285 Jan
12 10:
46:
45 example.com bluetoothd[
8900]: Not enough free handles to register service
286 Jan
12 10:
46:
45 example.com bluetoothd[
8900]: Current Time Service could not be registered
287 Jan
12 10:
46:
45 example.com bluetoothd[
8900]: gatt-time-server: Input/output error (
5)
290 <para>The dot (
"●") uses color on supported terminals to summarize the unit state at a
291 glance. Along with its color, its shape varies according to its state:
292 <literal>inactive
</literal> or
<literal>maintenance
</literal> is a white circle (
"○"),
293 <literal>active
</literal> is a green dot (
"●"),
<literal>deactivating
</literal> is a white dot,
294 <literal>failed
</literal> or
<literal>error
</literal> is a red cross (
"×"), and
295 <literal>reloading
</literal> is a green clockwise circle arrow (
"↻").
</para>
297 <para>The
"Loaded:" line in the output will show
<literal>loaded
</literal> if the unit has been
298 loaded into memory. Other possible values for
"Loaded:" include:
<literal>error
</literal> if
299 there was a problem loading it,
<literal>not-found
</literal> if no unit file was found for this
300 unit,
<literal>bad-setting
</literal> if an essential unit file setting could not be parsed and
301 <literal>masked
</literal> if the unit file has been masked. Along with showing the path to the
302 unit file, this line will also show the enablement state. Enabled units are included in the
303 dependency network between units, and thus are started at boot or via some other form of
304 activation. See the full table of possible enablement states — including the definition of
305 <literal>masked
</literal> — in the documentation for the
<command>is-enabled
</command> command.
308 <para>The
"Active:" line shows active state. The value is usually
<literal>active
</literal> or
309 <literal>inactive
</literal>. Active could mean started, bound, plugged in, etc depending on the
310 unit type. The unit could also be in process of changing states, reporting a state of
311 <literal>activating
</literal> or
<literal>deactivating
</literal>. A special
312 <literal>failed
</literal> state is entered when the service failed in some way, such as a crash,
313 exiting with an error code or timing out. If the failed state is entered the cause will be logged
314 for later reference.
</para>
321 <term><command>show
</command> <optional><replaceable>PATTERN
</replaceable>…|
<replaceable>JOB
</replaceable>…
</optional></term>
324 <para>Show properties of one or more units, jobs, or the manager itself. If no argument is specified,
325 properties of the manager will be shown. If a unit name is specified, properties of the unit are shown, and
326 if a job ID is specified, properties of the job are shown. By default, empty properties are suppressed. Use
327 <option>--all
</option> to show those too. To select specific properties to show, use
328 <option>--property=
</option>. This command is intended to be used whenever computer-parsable output is
329 required. Use
<command>status
</command> if you are looking for formatted human-readable output.
</para>
331 <para>Many properties shown by
<command>systemctl show
</command> map directly to configuration settings of
332 the system and service manager and its unit files. Note that the properties shown by the command are
333 generally more low-level, normalized versions of the original configuration settings and expose runtime
334 state in addition to configuration. For example, properties shown for service units include the service's
335 current main process identifier as
<literal>MainPID
</literal> (which is runtime state), and time settings
336 are always exposed as properties ending in the
<literal>…USec
</literal> suffix even if a matching
337 configuration options end in
<literal>…Sec
</literal>, because microseconds is the normalized time unit used
338 internally by the system and service manager.
</para>
340 <para>For details about many of these properties, see the documentation of the D-Bus interface
341 backing these properties, see
342 <citerefentry><refentrytitle>org.freedesktop.systemd1
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
</para>
347 <term><command>cat
<replaceable>PATTERN
</replaceable>…
</command></term>
350 <para>Show backing files of one or more units. Prints the
351 "fragment" and
"drop-ins" (source files) of units. Each
352 file is preceded by a comment which includes the file
353 name. Note that this shows the contents of the backing files
354 on disk, which may not match the system manager's
355 understanding of these units if any unit files were
356 updated on disk and the
<command>daemon-reload
</command>
357 command wasn't issued since.
</para>
359 <xi:include href=
"version-info.xml" xpointer=
"v209"/>
364 <term><command>help
<replaceable>PATTERN
</replaceable>…|
<replaceable>PID
</replaceable>…
</command></term>
367 <para>Show manual pages for one or more units, if
368 available. If a PID is given, the manual pages for the unit
369 the process belongs to are shown.
</para>
371 <xi:include href=
"version-info.xml" xpointer=
"v185"/>
377 <command>list-dependencies
</command>
378 <optional><replaceable>UNIT
</replaceable>...
</optional>
382 <para>Shows units required and wanted by the specified
383 units. This recursively lists units following the
384 <varname>Requires=
</varname>,
<varname>Requisite=
</varname>,
385 <varname>Wants=
</varname>,
<varname>ConsistsOf=
</varname>,
386 <varname>BindsTo=
</varname>, and
<varname>Upholds=
</varname>
387 dependencies. If no units are specified,
388 <filename>default.target
</filename> is implied.
</para>
390 <para>The units that are shown are additionally filtered by
<option>--type=
</option> and
391 <option>--state=
</option> if those options are specified. Note that we won't be able to
392 use a tree structure in this case, so
<option>--plain
</option> is implied.
</para>
394 <para>By default, only target units are recursively
395 expanded. When
<option>--all
</option> is passed, all other
396 units are recursively expanded as well.
</para>
398 <para>Options
<option>--reverse
</option>,
399 <option>--after
</option>,
<option>--before
</option>
400 may be used to change what types of dependencies
403 <para>Note that this command only lists units currently loaded into memory by the service manager. In
404 particular, this command is not suitable to get a comprehensive list at all reverse dependencies on a
405 specific unit, as it won't list the dependencies declared by units currently not loaded.
</para>
407 <xi:include href=
"version-info.xml" xpointer=
"v198"/>
411 <!-- Commands that modify unit state start here -->
414 <term><command>start
<replaceable>PATTERN
</replaceable>…
</command></term>
417 <para>Start (activate) one or more units specified on the command line.
</para>
419 <para>Note that unit glob patterns expand to names of units currently in memory. Units which are
420 not active and are not in a failed state usually are not in memory, and will not be matched by
421 any pattern. In addition, in case of instantiated units, systemd is often unaware of the instance
422 name until the instance has been started. Therefore, using glob patterns with
423 <command>start
</command> has limited usefulness. Also, secondary alias names of units are not
426 <para>Option
<option>--all
</option> may be used to also operate on inactive units which are
427 referenced by other loaded units. Note that this is not the same as operating on
"all" possible
428 units, because as the previous paragraph describes, such a list is ill-defined. Nevertheless,
429 <command>systemctl start --all
<replaceable>GLOB
</replaceable></command> may be useful if all the
430 units that should match the pattern are pulled in by some target which is known to be loaded.
435 <term><command>stop
<replaceable>PATTERN
</replaceable>…
</command></term>
438 <para>Stop (deactivate) one or more units specified on the command line.
</para>
440 <para>This command will fail if the unit does not exist or if stopping of the unit is prohibited (see
441 <varname>RefuseManualStop=
</varname> in
442 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
443 It will
<emphasis>not
</emphasis> fail if any of the commands configured to stop the unit
444 (
<varname>ExecStop=
</varname>, etc.) fail, because the manager will still forcibly terminate the
449 <term><command>reload
<replaceable>PATTERN
</replaceable>…
</command></term>
452 <para>Asks all units listed on the command line to reload
453 their configuration. Note that this will reload the
454 service-specific configuration, not the unit configuration
455 file of systemd. If you want systemd to reload the
456 configuration file of a unit, use the
457 <command>daemon-reload
</command> command. In other words:
458 for the example case of Apache, this will reload Apache's
459 <filename>httpd.conf
</filename> in the web server, not the
460 <filename>apache.service
</filename> systemd unit
463 <para>This command should not be confused with the
464 <command>daemon-reload
</command> command.
</para>
469 <term><command>restart
<replaceable>PATTERN
</replaceable>…
</command></term>
472 <para>Stop and then start one or more units specified on the command line. If the units are not running
473 yet, they will be started.
</para>
475 <para>Note that restarting a unit with this command does not necessarily flush out all of the unit's
476 resources before it is started again. For example, the per-service file descriptor storage facility (see
477 <varname>FileDescriptorStoreMax=
</varname> in
478 <citerefentry><refentrytitle>systemd.service
</refentrytitle><manvolnum>5</manvolnum></citerefentry>) will
479 remain intact as long as the unit has a job pending, and is only cleared when the unit is fully stopped and
480 no jobs are pending anymore. If it is intended that the file descriptor store is flushed out, too, during a
481 restart operation an explicit
<command>systemctl stop
</command> command followed by
<command>systemctl
482 start
</command> should be issued.
</para>
486 <term><command>try-restart
<replaceable>PATTERN
</replaceable>…
</command></term>
489 <para>Stop and then start one or more units specified on the
490 command line if the units are running. This does nothing
491 if units are not running.
</para>
492 <!-- Note that we don't document condrestart here, as that is just compatibility support, and we generally
493 don't document that. -->
497 <term><command>reload-or-restart
<replaceable>PATTERN
</replaceable>…
</command></term>
500 <para>Reload one or more units if they support it. If not, stop and then start them instead. If the units
501 are not running yet, they will be started.
</para>
505 <term><command>try-reload-or-restart
<replaceable>PATTERN
</replaceable>…
</command></term>
508 <para>Reload one or more units if they support it. If not, stop and then start them instead. This does
509 nothing if the units are not running.
</para>
510 <!-- Note that we don't document force-reload here, as that is just compatibility support, and we generally
511 don't document that. -->
513 <xi:include href=
"version-info.xml" xpointer=
"v229"/>
517 <term><command>isolate
<replaceable>UNIT
</replaceable></command></term>
520 <para>Start the unit specified on the command line and its dependencies
521 and stop all others, unless they have
522 <option>IgnoreOnIsolate=yes
</option> (see
523 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>).
524 If a unit name with no extension is given, an extension of
525 <literal>.target
</literal> will be assumed.
</para>
527 <para>This command is dangerous, since it will immediately stop processes that are not enabled in
528 the new target, possibly including the graphical environment or terminal you are currently using.
531 <para>Note that this operation is allowed only on units where
532 <option>AllowIsolate=
</option> is enabled. See
533 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
538 <term><command>kill
<replaceable>PATTERN
</replaceable>…
</command></term>
541 <para>Send a UNIX process signal to one or more processes of the unit. Use
542 <option>--kill-whom=
</option> to select which process to send the signal to. Use
543 <option>--signal=
</option> to select the signal to send. Combine with
544 <option>--kill-value=
</option> to enqueue a POSIX Realtime Signal with an associated
549 <term><command>clean
<replaceable>PATTERN
</replaceable>…
</command></term>
552 <para>Remove the configuration, state, cache, logs or runtime data of the specified units. Use
553 <option>--what=
</option> to select which kind of resource to remove. For service units this may
554 be used to remove the directories configured with
<varname>ConfigurationDirectory=
</varname>,
555 <varname>StateDirectory=
</varname>,
<varname>CacheDirectory=
</varname>,
556 <varname>LogsDirectory=
</varname> and
<varname>RuntimeDirectory=
</varname>, see
557 <citerefentry><refentrytitle>systemd.exec
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
558 for details. It may also be used to clear the file descriptor store as enabled via
559 <varname>FileDescriptorStoreMax=
</varname>, see
560 <citerefentry><refentrytitle>systemd.service
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
561 for details. For timer units this may be used to clear out the persistent timestamp data if
562 <varname>Persistent=
</varname> is used and
<option>--what=state
</option> is selected, see
563 <citerefentry><refentrytitle>systemd.timer
</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
564 command only applies to units that use either of these settings. If
<option>--what=
</option> is
565 not specified, the cache and runtime data as well as the file descriptor store are removed (as
566 these three types of resources are generally redundant and reproducible on the next invocation of
567 the unit). Note that the specified units must be stopped to invoke this operation.
</para>
569 <xi:include href=
"version-info.xml" xpointer=
"v243"/>
573 <term><command>freeze
<replaceable>PATTERN
</replaceable>…
</command></term>
576 <para>Freeze one or more units specified on the
577 command line using cgroup freezer
</para>
579 <para>Freezing the unit will cause all processes contained within the cgroup corresponding to the unit
580 to be suspended. Being suspended means that unit's processes won't be scheduled to run on CPU until thawed.
581 Note that this command is supported only on systems that use unified cgroup hierarchy. Unit is automatically
582 thawed just before we execute a job against the unit, e.g. before the unit is stopped.
</para>
584 <xi:include href=
"version-info.xml" xpointer=
"v246"/>
588 <term><command>thaw
<replaceable>PATTERN
</replaceable>…
</command></term>
591 <para>Thaw (unfreeze) one or more units specified on the
594 <para>This is the inverse operation to the
<command>freeze
</command> command and resumes the execution of
595 processes in the unit's cgroup.
</para>
597 <xi:include href=
"version-info.xml" xpointer=
"v246"/>
601 <term><command>set-property
<replaceable>UNIT
</replaceable> <replaceable>PROPERTY
</replaceable>=
<replaceable>VALUE
</replaceable>…
</command></term>
604 <para>Set the specified unit properties at runtime where
605 this is supported. This allows changing configuration
606 parameter properties such as resource control settings at
607 runtime. Not all properties may be changed at runtime, but
608 many resource control settings (primarily those in
609 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
610 may. The changes are applied immediately, and stored on disk
611 for future boots, unless
<option>--runtime
</option> is
612 passed, in which case the settings only apply until the
613 next reboot. The syntax of the property assignment follows
614 closely the syntax of assignments in unit files.
</para>
616 <para>Example:
<command>systemctl set-property foobar.service CPUWeight=
200</command></para>
618 <para>If the specified unit appears to be inactive, the
619 changes will be only stored on disk as described
620 previously hence they will be effective when the unit will
623 <para>Note that this command allows changing multiple properties at the same time, which is
624 preferable over setting them individually.
</para>
626 <para>Example:
<command>systemctl set-property foobar.service CPUWeight=
200 MemoryMax=
2G IPAccounting=yes
</command></para>
628 <para>Like with unit file configuration settings, assigning an empty setting usually resets a
629 property to its defaults.
</para>
631 <para>Example:
<command>systemctl set-property avahi-daemon.service IPAddressDeny=
</command></para>
633 <xi:include href=
"version-info.xml" xpointer=
"v206"/>
639 <command>bind
</command>
640 <replaceable>UNIT
</replaceable>
641 <replaceable>PATH
</replaceable>
642 [
<replaceable>PATH
</replaceable>]
645 <listitem><para>Bind-mounts a file or directory from the host into the specified unit's mount
646 namespace. The first path argument is the source file or directory on the host, the second path
647 argument is the destination file or directory in the unit's mount namespace. When the latter is
648 omitted, the destination path in the unit's mount namespace is the same as the source path on the
649 host. When combined with the
<option>--read-only
</option> switch, a ready-only bind mount is
650 created. When combined with the
<option>--mkdir
</option> switch, the destination path is first
651 created before the mount is applied.
</para>
653 <para>Note that this option is currently only supported for units that run within a mount namespace
654 (e.g.: with
<option>RootImage=
</option>,
<option>PrivateMounts=
</option>, etc.). This command
655 supports bind-mounting directories, regular files, device nodes,
<constant>AF_UNIX
</constant>
656 socket nodes, as well as FIFOs. The bind mount is ephemeral, and it is undone as soon as the
657 current unit process exists. Note that the namespace mentioned here, where the bind mount will be
658 added to, is the one where the main service process runs. Other processes (those exececuted by
659 <option>ExecReload=
</option>,
<option>ExecStartPre=
</option>, etc.) run in distinct namespaces.
662 <xi:include href=
"version-info.xml" xpointer=
"v248"/></listitem>
667 <command>mount-image
</command>
668 <replaceable>UNIT
</replaceable>
669 <replaceable>IMAGE
</replaceable>
670 [
<replaceable>PATH
</replaceable>
671 [
<replaceable>PARTITION_NAME
</replaceable>:
<replaceable>MOUNT_OPTIONS
</replaceable>]]
674 <listitem><para>Mounts an image from the host into the specified unit's mount namespace. The first
675 path argument is the source image on the host, the second path argument is the destination
676 directory in the unit's mount namespace (i.e. inside
677 <option>RootImage=
</option>/
<option>RootDirectory=
</option>). The following argument, if any, is
678 interpreted as a colon-separated tuple of partition name and comma-separated list of mount options
679 for that partition. The format is the same as the service
<option>MountImages=
</option>
680 setting. When combined with the
<option>--read-only
</option> switch, a ready-only mount is
681 created. When combined with the
<option>--mkdir
</option> switch, the destination path is first
682 created before the mount is applied.
</para>
684 <para>Note that this option is currently only supported for units that run within a mount namespace
685 (i.e. with
<option>RootImage=
</option>,
<option>PrivateMounts=
</option>, etc.). Note that the
686 namespace mentioned here where the image mount will be added to, is the one where the main service
687 process runs. Note that the namespace mentioned here, where the bind mount will be
688 added to, is the one where the main service process runs. Other processes (those exececuted by
689 <option>ExecReload=
</option>,
<option>ExecStartPre=
</option>, etc.) run in distinct namespaces.
693 <programlisting>systemctl mount-image foo.service /tmp/img.raw /var/lib/image root:ro,nosuid
</programlisting>
694 <programlisting>systemctl mount-image --mkdir bar.service /tmp/img.raw /var/lib/baz/img
</programlisting>
697 <xi:include href=
"version-info.xml" xpointer=
"v248"/></listitem>
701 <term><command>service-log-level
</command> <replaceable>SERVICE
</replaceable> [
<replaceable>LEVEL
</replaceable>]
</term>
703 <listitem><para>If the
<replaceable>LEVEL
</replaceable> argument is not given, print the current
704 log level as reported by service
<replaceable>SERVICE
</replaceable>.
</para>
706 <para>If the optional argument
<replaceable>LEVEL
</replaceable> is provided, then change the
707 current log level of the service to
<replaceable>LEVEL
</replaceable>. The log level should be a
708 typical syslog log level, i.e. a value in the range
0…
7 or one of the strings
709 <constant>emerg
</constant>,
<constant>alert
</constant>,
<constant>crit
</constant>,
710 <constant>err
</constant>,
<constant>warning
</constant>,
<constant>notice
</constant>,
711 <constant>info
</constant>,
<constant>debug
</constant>; see
<citerefentry
712 project='man-pages'
><refentrytitle>syslog
</refentrytitle><manvolnum>3</manvolnum></citerefentry>
715 <para>The service must have the appropriate
716 <varname>BusName=
<replaceable>destination
</replaceable></varname> property and also implement the
718 <citerefentry><refentrytitle>org.freedesktop.LogControl1
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
719 interface. (
<filename>systemctl
</filename> will use the generic D-Bus protocol to access the
720 <interfacename>org.freedesktop.LogControl1.LogLevel
</interfacename> interface for the D-Bus name
721 <replaceable>destination
</replaceable>.)
</para>
723 <xi:include href=
"version-info.xml" xpointer=
"v247"/></listitem>
727 <term><command>service-log-target
</command> <replaceable>SERVICE
</replaceable> [
<replaceable>TARGET
</replaceable>]
</term>
729 <listitem><para>If the
<replaceable>TARGET
</replaceable> argument is not given, print the current
730 log target as reported by service
<replaceable>SERVICE
</replaceable>.
</para>
732 <para>If the optional argument
<replaceable>TARGET
</replaceable> is provided, then change the
733 current log target of the service to
<replaceable>TARGET
</replaceable>. The log target should be
734 one of the strings
<constant>console
</constant> (for log output to the service's standard error
735 stream),
<constant>kmsg
</constant> (for log output to the kernel log buffer),
736 <constant>journal
</constant> (for log output to
737 <citerefentry><refentrytitle>systemd-journald.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
738 using the native journal protocol),
<constant>syslog
</constant> (for log output to the classic
739 syslog socket
<filename>/dev/log
</filename>),
<constant>null
</constant> (for no log output
740 whatsoever) or
<constant>auto
</constant> (for an automatically determined choice, typically
741 equivalent to
<constant>console
</constant> if the service is invoked interactively, and
742 <constant>journal
</constant> or
<constant>syslog
</constant> otherwise).
</para>
744 <para>For most services, only a small subset of log targets make sense. In particular, most
745 "normal" services should only implement
<constant>console
</constant>,
<constant>journal
</constant>,
746 and
<constant>null
</constant>. Anything else is only appropriate for low-level services that
747 are active in very early boot before proper logging is established.
</para>
749 <para>The service must have the appropriate
750 <varname>BusName=
<replaceable>destination
</replaceable></varname> property and also implement the
752 <citerefentry><refentrytitle>org.freedesktop.LogControl1
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
753 interface. (
<filename>systemctl
</filename> will use the generic D-Bus protocol to access the
754 <interfacename>org.freedesktop.LogControl1.LogLevel
</interfacename> interface for the D-Bus name
755 <replaceable>destination
</replaceable>.)
</para>
757 <xi:include href=
"version-info.xml" xpointer=
"v247"/></listitem>
761 <term><command>reset-failed [
<replaceable>PATTERN
</replaceable>…]
</command></term>
764 <para>Reset the
<literal>failed
</literal> state of the specified units, or if no unit name is passed, reset
765 the state of all units. When a unit fails in some way (i.e. process exiting with non-zero error code,
766 terminating abnormally or timing out), it will automatically enter the
<literal>failed
</literal> state and
767 its exit code and status is recorded for introspection by the administrator until the service is
768 stopped/re-started or reset with this command.
</para>
770 <para>In addition to resetting the
<literal>failed
</literal> state of a unit it also resets various other
771 per-unit properties: the start rate limit counter of all unit types is reset to zero, as is the restart
772 counter of service units. Thus, if a unit's start limit (as configured with
773 <varname>StartLimitIntervalSec=
</varname>/
<varname>StartLimitBurst=
</varname>) is hit and the unit refuses
774 to be started again, use this command to make it startable again.
</para>
779 <term><command>whoami [
<replaceable>PID
</replaceable>…]
</command></term>
781 <listitem><para>Returns the units the processes referenced by the given PIDs belong to (one per
782 line). If no PID is specified returns the unit the
<command>systemctl
</command> command is invoked
785 <xi:include href=
"version-info.xml" xpointer=
"v254"/></listitem>
792 <title>Unit File Commands
</title>
796 <term><command>list-unit-files
</command> <optional><replaceable>PATTERN…
</replaceable></optional></term>
799 <para>List unit files installed on the system, in combination with their enablement state (as
800 reported by
<command>is-enabled
</command>). If one or more
<replaceable>PATTERN
</replaceable>s
801 are specified, only unit files whose name matches one of them are shown (patterns matching unit
802 file system paths are not supported).
</para>
804 <para>Unlike
<command>list-units
</command> this command will list template units in addition to
805 explicitly instantiated units.
</para>
807 <xi:include href=
"version-info.xml" xpointer=
"v233"/>
812 <term><command>enable
<replaceable>UNIT
</replaceable>…
</command></term>
813 <term><command>enable
<replaceable>PATH
</replaceable>…
</command></term>
816 <para>Enable one or more units or unit instances. This will create a set of symlinks, as encoded in the
817 [Install] sections of the indicated unit files. After the symlinks have been created,
818 the system manager configuration is reloaded (in a way equivalent to
<command>daemon-reload
</command>), in
819 order to ensure the changes are taken into account immediately. Note that this does
820 <emphasis>not
</emphasis> have the effect of also starting any of the units being enabled. If this is
821 desired, combine this command with the
<option>--now
</option> switch, or invoke
<command>start
</command>
822 with appropriate arguments later. Note that in case of unit instance enablement (i.e. enablement of units of
823 the form
<filename>foo@bar.service
</filename>), symlinks named the same as instances are created in the
824 unit configuration directory, however they point to the single template unit file they are instantiated
827 <para>This command expects either valid unit names (in which case various unit file directories are
828 automatically searched for unit files with appropriate names), or absolute paths to unit files (in which
829 case these files are read directly). If a specified unit file is located outside of the usual unit file
830 directories, an additional symlink is created, linking it into the unit configuration path, thus ensuring
831 it is found when requested by commands such as
<command>start
</command>. The file system where the linked
832 unit files are located must be accessible when systemd is started (e.g. anything underneath
833 <filename>/home/
</filename> or
<filename>/var/
</filename> is not allowed, unless those directories are
834 located on the root file system).
</para>
836 <para>This command will print the file system operations executed. This output may be suppressed by passing
837 <option>--quiet
</option>.
840 <para>Note that this operation creates only the symlinks suggested in the [Install]
841 section of the unit files. While this command is the recommended way to manipulate the unit configuration
842 directory, the administrator is free to make additional changes manually by placing or removing symlinks
843 below this directory. This is particularly useful to create configurations that deviate from the suggested
844 default installation. In this case, the administrator must make sure to invoke
845 <command>daemon-reload
</command> manually as necessary, in order to ensure the changes are taken into
849 <para>When using this operation on units without install information, a warning about it is shown.
850 <option>--no-warn
</option> can be used to suppress the warning.
</para>
852 <para>Enabling units should not be confused with starting (activating) units, as done by the
853 <command>start
</command> command. Enabling and starting units is orthogonal: units may be enabled without
854 being started and started without being enabled. Enabling simply hooks the unit into various suggested
855 places (for example, so that the unit is automatically started on boot or when a particular kind of
856 hardware is plugged in). Starting actually spawns the daemon process (in case of service units), or binds
857 the socket (in case of socket units), and so on.
</para>
859 <para>Depending on whether
<option>--system
</option>,
<option>--user
</option>,
<option>--runtime
</option>,
860 or
<option>--global
</option> is specified, this enables the unit for the system, for the calling user only,
861 for only this boot of the system, or for all future logins of all users. Note that in the last case, no
862 systemd daemon configuration is reloaded.
</para>
864 <para>Using
<command>enable
</command> on masked units is not supported and results in an error.
</para>
869 <term><command>disable
<replaceable>UNIT
</replaceable>…
</command></term>
872 <para>Disables one or more units. This removes all symlinks to the unit files backing the specified units
873 from the unit configuration directory, and hence undoes any changes made by
<command>enable
</command> or
874 <command>link
</command>. Note that this removes
<emphasis>all
</emphasis> symlinks to matching unit files,
875 including manually created symlinks, and not just those actually created by
<command>enable
</command> or
876 <command>link
</command>. Note that while
<command>disable
</command> undoes the effect of
877 <command>enable
</command>, the two commands are otherwise not symmetric, as
<command>disable
</command> may
878 remove more symlinks than a prior
<command>enable
</command> invocation of the same unit created.
</para>
880 <para>This command expects valid unit names only, it does not accept paths to unit files.
</para>
882 <para>In addition to the units specified as arguments, all units are disabled that are listed in the
883 <varname>Also=
</varname> setting contained in the [Install] section of any of the unit
884 files being operated on.
</para>
886 <para>This command implicitly reloads the system manager configuration after completing the operation. Note
887 that this command does not implicitly stop the units that are being disabled. If this is desired, either
888 combine this command with the
<option>--now
</option> switch, or invoke the
<command>stop
</command> command
889 with appropriate arguments later.
</para>
891 <para>This command will print information about the file system operations (symlink removals)
892 executed. This output may be suppressed by passing
<option>--quiet
</option>.
895 <para>When this command is used with
<option>--user
</option>, the units being operated on might
896 still be enabled in global scope, and thus get started automatically even after a successful
897 disablement in user scope. In this case, a warning about it is shown, which can be suppressed
898 using
<option>--no-warn
</option>.
</para>
900 <para>This command honors
<option>--system
</option>,
<option>--user
</option>,
<option>--runtime
</option>,
901 <option>--global
</option> and
<option>--no-warn
</option> in a similar way as
<command>enable
</command>.
</para>
903 <xi:include href=
"version-info.xml" xpointer=
"v238"/>
908 <term><command>reenable
<replaceable>UNIT
</replaceable>…
</command></term>
911 <para>Reenable one or more units, as specified on the command line. This is a combination of
912 <command>disable
</command> and
<command>enable
</command> and is useful to reset the symlinks a unit file is
913 enabled with to the defaults configured in its [Install] section. This command expects
914 a unit name only, it does not accept paths to unit files.
</para>
916 <xi:include href=
"version-info.xml" xpointer=
"v238"/>
921 <term><command>preset
<replaceable>UNIT
</replaceable>…
</command></term>
924 <para>Reset the enable/disable status one or more unit files, as specified on
925 the command line, to the defaults configured in the preset policy files. This
926 has the same effect as
<command>disable
</command> or
927 <command>enable
</command>, depending how the unit is listed in the preset
930 <para>Use
<option>--preset-mode=
</option> to control whether units shall be
931 enabled and disabled, or only enabled, or only disabled.
</para>
933 <para>If the unit carries no install information, it will be silently ignored
934 by this command.
<replaceable>UNIT
</replaceable> must be the real unit name,
935 any alias names are ignored silently.
</para>
937 <para>For more information on the preset policy format, see
938 <citerefentry><refentrytitle>systemd.preset
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
941 <xi:include href=
"version-info.xml" xpointer=
"v238"/>
946 <term><command>preset-all
</command></term>
949 <para>Resets all installed unit files to the defaults
950 configured in the preset policy file (see above).
</para>
952 <para>Use
<option>--preset-mode=
</option> to control
953 whether units shall be enabled and disabled, or only
954 enabled, or only disabled.
</para>
956 <xi:include href=
"version-info.xml" xpointer=
"v215"/>
961 <term><command>is-enabled
<replaceable>UNIT
</replaceable>…
</command></term>
964 <para>Checks whether any of the specified unit files are
965 enabled (as with
<command>enable
</command>). Returns an
966 exit code of
0 if at least one is enabled, non-zero
967 otherwise. Prints the current enable status (see table).
968 To suppress this output, use
<option>--quiet
</option>.
969 To show installation targets, use
<option>--full
</option>.
974 <command>is-enabled
</command> output
981 <entry>Description
</entry>
982 <entry>Exit Code
</entry>
987 <entry><literal>enabled
</literal></entry>
988 <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>
989 <entry morerows='
1'
>0</entry>
992 <entry><literal>enabled-runtime
</literal></entry>
995 <entry><literal>linked
</literal></entry>
996 <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>
997 <entry morerows='
1'
>> 0</entry>
1000 <entry><literal>linked-runtime
</literal></entry>
1003 <entry><literal>alias
</literal></entry>
1004 <entry>The name is an alias (symlink to another unit file).
</entry>
1008 <entry><literal>masked
</literal></entry>
1009 <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>
1010 <entry morerows='
1'
>> 0</entry>
1013 <entry><literal>masked-runtime
</literal></entry>
1016 <entry><literal>static
</literal></entry>
1017 <entry>The unit file is not enabled, and has no provisions for enabling in the [Install] unit file section.
</entry>
1021 <entry><literal>indirect
</literal></entry>
1022 <entry>The unit file itself is not enabled, but it has a non-empty
<varname>Also=
</varname> setting in the [Install] unit file section, listing other unit files that might be enabled, or it has an alias under a different name through a symlink that is not specified in
<varname>Also=
</varname>. For template unit files, an instance different than the one specified in
<varname>DefaultInstance=
</varname> is enabled.
</entry>
1026 <entry><literal>disabled
</literal></entry>
1027 <entry>The unit file is not enabled, but contains an [Install] section with installation instructions.
</entry>
1028 <entry>> 0</entry>
1031 <entry><literal>generated
</literal></entry>
1032 <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>
1036 <entry><literal>transient
</literal></entry>
1037 <entry>The unit file has been created dynamically with the runtime API. Transient units may not be enabled.
</entry>
1041 <entry><literal>bad
</literal></entry>
1042 <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>
1043 <entry>> 0</entry>
1046 <entry><literal>not-found
</literal></entry>
1047 <entry>The unit file doesn't exist.
</entry>
1054 <xi:include href=
"version-info.xml" xpointer=
"v238"/>
1060 <term><command>mask
<replaceable>UNIT
</replaceable>…
</command></term>
1063 <para>Mask one or more units, as specified on the command line. This will link these unit files
1064 to
<filename>/dev/null
</filename>, making it impossible to start them. This is a stronger version
1065 of
<command>disable
</command>, since it prohibits all kinds of activation of the unit, including
1066 enablement and manual activation. Use this option with care. This honors the
1067 <option>--runtime
</option> option to only mask temporarily until the next reboot of the
1068 system. The
<option>--now
</option> option may be used to ensure that the units are also
1069 stopped. This command expects valid unit names only, it does not accept unit file paths.
</para>
1071 <para>Note that this will create a symlink under the unit's name in
1072 <filename>/etc/systemd/system/
</filename> (in case
<option>--runtime
</option> is not specified)
1073 or
<filename>/run/systemd/system/
</filename> (in case
<option>--runtime
</option> is
1074 specified). If a matching unit file already exists under these directories this operation will
1075 hence fail. This means that the operation is primarily useful to mask units shipped by the vendor
1076 (as those are shipped in
<filename>/usr/lib/systemd/system/
</filename> and not the aforementioned
1077 two directories), but typically doesn't work for units created locally (as those are typically
1078 placed precisely in the two aforementioned directories). Similar restrictions apply for
1079 <option>--user
</option> mode, in which case the directories are below the user's home directory
1082 <xi:include href=
"version-info.xml" xpointer=
"v238"/>
1087 <term><command>unmask
<replaceable>UNIT
</replaceable>…
</command></term>
1090 <para>Unmask one or more unit files, as specified on the command line. This will undo the effect of
1091 <command>mask
</command>. This command expects valid unit names only, it does not accept unit file
1094 <xi:include href=
"version-info.xml" xpointer=
"v238"/>
1099 <term><command>link
<replaceable>PATH
</replaceable>…
</command></term>
1102 <para>Link a unit file that is not in the unit file search path into the unit file search path. This
1103 command expects an absolute path to a unit file. The effect of this may be undone with
1104 <command>disable
</command>. The effect of this command is that a unit file is made available for commands
1105 such as
<command>start
</command>, even though it is not installed directly in the unit search path. The
1106 file system where the linked unit files are located must be accessible when systemd is started
1107 (e.g. anything underneath
<filename>/home/
</filename> or
<filename>/var/
</filename> is not allowed, unless
1108 those directories are located on the root file system).
</para>
1110 <xi:include href=
"version-info.xml" xpointer=
"v233"/>
1115 <term><command>revert
<replaceable>UNIT
</replaceable>…
</command></term>
1118 <para>Revert one or more unit files to their vendor versions. This command removes drop-in configuration
1119 files that modify the specified units, as well as any user-configured unit file that overrides a matching
1120 vendor supplied unit file. Specifically, for a unit
<literal>foo.service
</literal> the matching directories
1121 <literal>foo.service.d/
</literal> with all their contained files are removed, both below the persistent and
1122 runtime configuration directories (i.e. below
<filename>/etc/systemd/system
</filename> and
1123 <filename>/run/systemd/system
</filename>); if the unit file has a vendor-supplied version (i.e. a unit file
1124 located below
<filename>/usr/
</filename>) any matching persistent or runtime unit file that overrides it is
1125 removed, too. Note that if a unit file has no vendor-supplied version (i.e. is only defined below
1126 <filename>/etc/systemd/system
</filename> or
<filename>/run/systemd/system
</filename>, but not in a unit
1127 file stored below
<filename>/usr/
</filename>), then it is not removed. Also, if a unit is masked, it is
1130 <para>Effectively, this command may be used to undo all changes made with
<command>systemctl
1131 edit
</command>,
<command>systemctl set-property
</command> and
<command>systemctl mask
</command> and puts
1132 the original unit file with its settings back in effect.
</para>
1134 <xi:include href=
"version-info.xml" xpointer=
"v230"/>
1139 <term><command>add-wants
<replaceable>TARGET
</replaceable>
1140 <replaceable>UNIT
</replaceable>…
</command></term>
1141 <term><command>add-requires
<replaceable>TARGET
</replaceable>
1142 <replaceable>UNIT
</replaceable>…
</command></term>
1145 <para>Adds
<literal>Wants=
</literal> or
<literal>Requires=
</literal>
1146 dependencies, respectively, to the specified
1147 <replaceable>TARGET
</replaceable> for one or more units.
</para>
1149 <para>This command honors
<option>--system
</option>,
1150 <option>--user
</option>,
<option>--runtime
</option> and
1151 <option>--global
</option> in a way similar to
1152 <command>enable
</command>.
</para>
1154 <xi:include href=
"version-info.xml" xpointer=
"v217"/>
1160 <term><command>edit
<replaceable>UNIT
</replaceable>…
</command></term>
1163 <para>Edit a drop-in snippet or a whole replacement file if
1164 <option>--full
</option> is specified, to extend or override the
1165 specified unit.
</para>
1167 <para>Depending on whether
<option>--system
</option> (the default),
1168 <option>--user
</option>, or
<option>--global
</option> is specified,
1169 this command creates a drop-in file for each unit either for the system,
1170 for the calling user, or for all futures logins of all users. Then,
1171 the editor (see the
"Environment" section below) is invoked on
1172 temporary files which will be written to the real location if the
1173 editor exits successfully.
</para>
1175 <para>If
<option>--drop-in=
</option> is specified, the given drop-in file name
1176 will be used instead of the default
<filename>override.conf
</filename>.
</para>
1178 <para>If
<option>--full
</option> is specified, this will copy the
1179 original units instead of creating drop-in files.
</para>
1181 <para>If
<option>--force
</option> is specified and any units do
1182 not already exist, new unit files will be opened for editing.
</para>
1184 <para>If
<option>--runtime
</option> is specified, the changes will
1185 be made temporarily in
<filename>/run/
</filename> and they will be
1186 lost on the next reboot.
</para>
1188 <para>If the temporary file is empty upon exit, the modification of
1189 the related unit is canceled.
</para>
1191 <para>After the units have been edited, systemd configuration is
1192 reloaded (in a way that is equivalent to
<command>daemon-reload
</command>).
1195 <para>Note that this command cannot be used to remotely edit units
1196 and that you cannot temporarily edit units which are in
1197 <filename>/etc/
</filename>, since they take precedence over
1198 <filename>/run/
</filename>.
</para>
1200 <xi:include href=
"version-info.xml" xpointer=
"v218"/>
1205 <term><command>get-default
</command></term>
1208 <para>Return the default target to boot into. This returns
1209 the target unit name
<filename>default.target
</filename>
1210 is aliased (symlinked) to.
</para>
1212 <xi:include href=
"version-info.xml" xpointer=
"v205"/>
1217 <term><command>set-default
<replaceable>TARGET
</replaceable></command></term>
1220 <para>Set the default target to boot into. This sets
1221 (symlinks) the
<filename>default.target
</filename> alias
1222 to the given target unit.
</para>
1224 <xi:include href=
"version-info.xml" xpointer=
"v205"/>
1232 <title>Machine Commands
</title>
1236 <term><command>list-machines
</command> <optional><replaceable>PATTERN
</replaceable>…
</optional></term>
1239 <para>List the host and all running local containers with
1240 their state. If one or more
1241 <replaceable>PATTERN
</replaceable>s are specified, only
1242 containers matching one of them are shown.
1245 <xi:include href=
"version-info.xml" xpointer=
"v212"/>
1252 <title>Job Commands
</title>
1256 <term><command>list-jobs
<optional><replaceable>PATTERN…
</replaceable></optional></command></term>
1259 <para>List jobs that are in progress. If one or more
1260 <replaceable>PATTERN
</replaceable>s are specified, only
1261 jobs for units matching one of them are shown.
</para>
1263 <para>When combined with
<option>--after
</option> or
<option>--before
</option> the list is augmented with
1264 information on which other job each job is waiting for, and which other jobs are waiting for it, see
1267 <xi:include href=
"version-info.xml" xpointer=
"v233"/>
1271 <term><command>cancel
<optional><replaceable>JOB
</replaceable>…
</optional></command></term>
1274 <para>Cancel one or more jobs specified on the command line
1275 by their numeric job IDs. If no job ID is specified, cancel
1276 all pending jobs.
</para>
1278 <xi:include href=
"version-info.xml" xpointer=
"v233"/>
1285 <title>Environment Commands
</title>
1287 <para><command>systemd
</command> supports an environment block that is passed to processes the manager
1288 spawns. The names of the variables can contain ASCII letters, digits, and the underscore
1289 character. Variable names cannot be empty or start with a digit. In variable values, most characters
1290 are allowed, but the whole sequence must be valid UTF-
8. (Note that control characters like newline
1291 (
<constant>NL
</constant>), tab (
<constant>TAB
</constant>), or the escape character
1292 (
<constant>ESC
</constant>),
<emphasis>are
</emphasis> valid ASCII and thus valid UTF-
8). The total
1293 length of the environment block is limited to
<constant>_SC_ARG_MAX
</constant> value defined by
1294 <citerefentry project='man-pages'
><refentrytitle>sysconf
</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
1299 <term><command>show-environment
</command></term>
1302 <para>Dump the systemd manager environment block. This is the environment
1303 block that is passed to all processes the manager spawns. The environment
1304 block will be dumped in straightforward form suitable for sourcing into
1305 most shells. If no special characters or whitespace is present in the variable
1306 values, no escaping is performed, and the assignments have the form
1307 <literal>VARIABLE=value
</literal>. If whitespace or characters which have
1308 special meaning to the shell are present, dollar-single-quote escaping is
1309 used, and assignments have the form
<literal>VARIABLE=$'value'
</literal>.
1310 This syntax is known to be supported by
1311 <citerefentry project='die-net'
><refentrytitle>bash
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1312 <citerefentry project='die-net'
><refentrytitle>zsh
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1313 <citerefentry project='die-net'
><refentrytitle>ksh
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1315 <citerefentry project='die-net'
><refentrytitle>busybox
</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
1316 <citerefentry project='die-net'
><refentrytitle>ash
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1318 <citerefentry project='die-net'
><refentrytitle>dash
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
1320 <citerefentry project='die-net'
><refentrytitle>fish
</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
1325 <term><command>set-environment
<replaceable>VARIABLE=VALUE
</replaceable>…
</command></term>
1328 <para>Set one or more systemd manager environment variables, as specified on the command
1329 line. This command will fail if variable names and values do not conform to the rules listed
1332 <xi:include href=
"version-info.xml" xpointer=
"v233"/>
1336 <term><command>unset-environment
<replaceable>VARIABLE
</replaceable>…
</command></term>
1339 <para>Unset one or more systemd manager environment
1340 variables. If only a variable name is specified, it will be
1341 removed regardless of its value. If a variable and a value
1342 are specified, the variable is only removed if it has the
1343 specified value.
</para>
1345 <xi:include href=
"version-info.xml" xpointer=
"v233"/>
1350 <command>import-environment
</command>
1351 <replaceable>VARIABLE…
</replaceable>
1355 <para>Import all, one or more environment variables set on the client into the systemd manager
1356 environment block. If a list of environment variable names is passed, client-side values are then
1357 imported into the manager's environment block. If any names are not valid environment variable
1358 names or have invalid values according to the rules described above, an error is raised. If no
1359 arguments are passed, the entire environment block inherited by the
<command>systemctl
</command>
1360 process is imported. In this mode, any inherited invalid environment variables are quietly
1363 <para>Importing of the full inherited environment block (calling this command without any
1364 arguments) is deprecated. A shell will set dozens of variables which only make sense locally and
1365 are only meant for processes which are descendants of the shell. Such variables in the global
1366 environment block are confusing to other processes.
</para>
1368 <xi:include href=
"version-info.xml" xpointer=
"v209"/>
1375 <title>Manager State Commands
</title>
1379 <term><command>daemon-reload
</command></term>
1382 <para>Reload the systemd manager configuration. This will
1383 rerun all generators (see
1384 <citerefentry><refentrytitle>systemd.generator
</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
1385 reload all unit files, and recreate the entire dependency
1386 tree. While the daemon is being reloaded, all sockets
1387 systemd listens on behalf of user configuration will stay
1390 <para>This command should not be confused with the
1391 <command>reload
</command> command.
</para>
1396 <term><command>daemon-reexec
</command></term>
1399 <para>Reexecute the systemd manager. This will serialize the
1400 manager state, reexecute the process and deserialize the
1401 state again. This command is of little use except for
1402 debugging and package upgrades. Sometimes, it might be
1403 helpful as a heavy-weight
<command>daemon-reload
</command>.
1404 While the daemon is being reexecuted, all sockets systemd listening
1405 on behalf of user configuration will stay accessible.
1410 <varlistentry id='log-level'
>
1411 <term><command>log-level
</command> [
<replaceable>LEVEL
</replaceable>]
</term>
1413 <listitem><para>If no argument is given, print the current log level of the manager. If an
1414 optional argument
<replaceable>LEVEL
</replaceable> is provided, then the command changes the
1415 current log level of the manager to
<replaceable>LEVEL
</replaceable> (accepts the same values as
1416 <option>--log-level=
</option> described in
1417 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
1420 <xi:include href=
"version-info.xml" xpointer=
"v244"/></listitem>
1424 <term><command>log-target
</command> [
<replaceable>TARGET
</replaceable>]
</term>
1426 <listitem><para>If no argument is given, print the current log target of the manager. If an
1427 optional argument
<replaceable>TARGET
</replaceable> is provided, then the command changes the
1428 current log target of the manager to
<replaceable>TARGET
</replaceable> (accepts the same values as
1429 <option>--log-target=
</option>, described in
1430 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
1433 <xi:include href=
"version-info.xml" xpointer=
"v244"/></listitem>
1437 <term><command>service-watchdogs
</command> [yes|no]
</term>
1439 <listitem><para>If no argument is given, print the current state of service runtime watchdogs of
1440 the manager. If an optional boolean argument is provided, then globally enables or disables the
1441 service runtime watchdogs (
<option>WatchdogSec=
</option>) and emergency actions (e.g.
1442 <option>OnFailure=
</option> or
<option>StartLimitAction=
</option>); see
1443 <citerefentry><refentrytitle>systemd.service
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
1444 The hardware watchdog is not affected by this setting.
</para>
1446 <xi:include href=
"version-info.xml" xpointer=
"v244"/></listitem>
1452 <title>System Commands
</title>
1456 <term><command>is-system-running
</command></term>
1459 <para>Checks whether the system is operational. This
1460 returns success (exit code
0) when the system is fully up
1461 and running, specifically not in startup, shutdown or
1462 maintenance mode, and with no failed services. Failure is
1463 returned otherwise (exit code non-zero). In addition, the
1464 current state is printed in a short string to standard
1465 output, see the table below. Use
<option>--quiet
</option> to
1466 suppress this output.
</para>
1468 <para>Use
<option>--wait
</option> to wait until the boot
1469 process is completed before printing the current state and
1470 returning the appropriate error status. If
<option>--wait
</option>
1471 is in use, states
<varname>initializing
</varname> or
1472 <varname>starting
</varname> will not be reported, instead
1473 the command will block until a later state (such as
1474 <varname>running
</varname> or
<varname>degraded
</varname>)
1478 <title><command>is-system-running
</command> output
</title>
1480 <colspec colname='name'
/>
1481 <colspec colname='description'
/>
1482 <colspec colname='exit-code'
/>
1486 <entry>Description
</entry>
1487 <entry>Exit Code
</entry>
1492 <entry><varname>initializing
</varname></entry>
1493 <entry><para>Early bootup, before
1494 <filename>basic.target
</filename> is reached
1495 or the
<varname>maintenance
</varname> state entered.
1497 <entry>> 0</entry>
1500 <entry><varname>starting
</varname></entry>
1501 <entry><para>Late bootup, before the job queue
1502 becomes idle for the first time, or one of the
1503 rescue targets are reached.
</para></entry>
1504 <entry>> 0</entry>
1507 <entry><varname>running
</varname></entry>
1508 <entry><para>The system is fully
1509 operational.
</para></entry>
1513 <entry><varname>degraded
</varname></entry>
1514 <entry><para>The system is operational but one or more
1515 units failed.
</para></entry>
1516 <entry>> 0</entry>
1519 <entry><varname>maintenance
</varname></entry>
1520 <entry><para>The rescue or emergency target is
1521 active.
</para></entry>
1522 <entry>> 0</entry>
1525 <entry><varname>stopping
</varname></entry>
1526 <entry><para>The manager is shutting
1527 down.
</para></entry>
1528 <entry>> 0</entry>
1531 <entry><varname>offline
</varname></entry>
1532 <entry><para>The manager is not
1533 running. Specifically, this is the operational
1534 state if an incompatible program is running as
1535 system manager (PID
1).
</para></entry>
1536 <entry>> 0</entry>
1539 <entry><varname>unknown
</varname></entry>
1540 <entry><para>The operational state could not be
1541 determined, due to lack of resources or another
1542 error cause.
</para></entry>
1543 <entry>> 0</entry>
1549 <xi:include href=
"version-info.xml" xpointer=
"v215"/>
1554 <term><command>default
</command></term>
1557 <para>Enter default mode. This is equivalent to
<command>systemctl isolate default.target
</command>. This
1558 operation is blocking by default, use
<option>--no-block
</option> to request asynchronous behavior.
</para>
1563 <term><command>rescue
</command></term>
1566 <para>Enter rescue mode. This is equivalent to
<command>systemctl isolate rescue.target
</command>. This
1567 operation is blocking by default, use
<option>--no-block
</option> to request asynchronous behavior.
</para>
1571 <term><command>emergency
</command></term>
1574 <para>Enter emergency mode. This is equivalent to
<command>systemctl isolate
1575 emergency.target
</command>. This operation is blocking by default, use
<option>--no-block
</option> to
1576 request asynchronous behavior.
</para>
1580 <term><command>halt
</command></term>
1583 <para>Shut down and halt the system. This is mostly equivalent to
<command>systemctl start halt.target
1584 --job-mode=replace-irreversibly --no-block
</command>, but also prints a wall message to all users. This command is
1585 asynchronous; it will return after the halt operation is enqueued, without waiting for it to complete. Note
1586 that this operation will simply halt the OS kernel after shutting down, leaving the hardware powered
1587 on. Use
<command>systemctl poweroff
</command> for powering off the system (see below).
</para>
1589 <para>If combined with
<option>--force
</option>, shutdown of all running services is skipped, however all
1590 processes are killed and all file systems are unmounted or mounted read-only, immediately followed by the
1591 system halt. If
<option>--force
</option> is specified twice, the operation is immediately executed without
1592 terminating any processes or unmounting any file systems. This may result in data loss. Note that when
1593 <option>--force
</option> is specified twice the halt operation is executed by
<command>systemctl
</command>
1594 itself, and the system manager is not contacted. This means the command should succeed even when the system
1595 manager has crashed.
</para>
1597 <para>If combined with
<option>--when=
</option>, shutdown will be scheduled after the given timestamp.
1598 And
<option>--when=cancel
</option> will cancel the shutdown.
</para>
1602 <term><command>poweroff
</command></term>
1605 <para>Shut down and power-off the system. This is mostly equivalent to
<command>systemctl start
1606 poweroff.target --job-mode=replace-irreversibly --no-block
</command>, but also prints a wall message to all
1607 users. This command is asynchronous; it will return after the power-off operation is enqueued, without
1608 waiting for it to complete.
</para>
1610 <para>This command honors
<option>--force
</option> and
<option>--when=
</option> in a similar way
1611 as
<command>halt
</command>.
</para>
1615 <term><command>reboot
</command></term>
1618 <para>Shut down and reboot the system.
</para>
1620 <para>This command mostly equivalent to
<command>systemctl start reboot.target
1621 --job-mode=replace-irreversibly --no-block
</command>, but also prints a wall message to all
1622 users. This command is asynchronous; it will return after the reboot operation is enqueued,
1623 without waiting for it to complete.
</para>
1625 <para>If the switch
<option>--reboot-argument=
</option> is given, it will be passed as the optional
1626 argument to the
<citerefentry><refentrytitle>reboot
</refentrytitle><manvolnum>2</manvolnum></citerefentry>
1629 <para>Options
<option>--boot-loader-entry=
</option>,
<option>--boot-loader-menu=
</option>, and
1630 <option>--firmware-setup
</option> can be used to select what to do
<emphasis>after
</emphasis> the
1631 reboot. See the descriptions of those options for details.
</para>
1633 <para>This command honors
<option>--force
</option> and
<option>--when=
</option> in a similar way
1634 as
<command>halt
</command>.
</para>
1636 <xi:include href=
"version-info.xml" xpointer=
"v246"/>
1641 <term><command>kexec
</command></term>
1644 <para>Shut down and reboot the system via
<command>kexec
</command>. This command will load a
1645 kexec kernel if one wasn't loaded yet or fail. A kernel may be loaded earlier by a separate step,
1646 this is particularly useful if a custom initrd or additional kernel commandline options are
1647 desired. The
<option>--force
</option> can be used to continue without a kexec kernel, i.e. to
1648 perform a normal reboot. The final reboot step is equivalent to
1649 <command>systemctl start kexec.target --job-mode=replace-irreversibly --no-block
</command>.
1652 <para>To load a kernel, an enumeration is performed following the
1653 <ulink url=
"https://uapi-group.org/specifications/specs/boot_loader_specification">Boot Loader Specification
</ulink>,
1654 and the default boot entry is loaded. For this step to succeed, the system must be using UEFI
1655 and the boot loader entries must be configured appropriately.
<command>bootctl list
</command>
1656 may be used to list boot entries, see
1657 <citerefentry><refentrytitle>bootctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
1660 <para>This command is asynchronous; it will return after the reboot operation is enqueued,
1661 without waiting for it to complete.
</para>
1663 <para>This command honors
<option>--force
</option> and
<option>--when=
</option> similarly
1664 to
<command>halt
</command>.
</para>
1669 <term><command>soft-reboot
</command></term>
1672 <para>Shut down and reboot userspace. This is equivalent to
<command>systemctl start
1673 soft-reboot.target --job-mode=replace-irreversibly --no-block
</command>. This command is
1674 asynchronous; it will return after the reboot operation is enqueued, without waiting for it to
1677 <para>This command honors
<option>--force
</option> and
<option>--when=
</option> in a similar way
1678 as
<command>halt
</command>.
</para>
1680 <para>This operation only reboots userspace, leaving the kernel running. See
1681 <citerefentry><refentrytitle>systemd-soft-reboot.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
1684 <xi:include href=
"version-info.xml" xpointer=
"v254"/>
1689 <term><command>exit
</command> <optional><replaceable>EXIT_CODE
</replaceable></optional></term>
1692 <para>Ask the service manager to quit. This is only supported for user service managers (i.e. in
1693 conjunction with the
<option>--user
</option> option) or in containers and is equivalent to
1694 <command>poweroff
</command> otherwise. This command is asynchronous; it will return after the exit
1695 operation is enqueued, without waiting for it to complete.
</para>
1697 <para>The service manager will exit with the specified exit code, if
1698 <replaceable>EXIT_CODE
</replaceable> is passed.
</para>
1700 <xi:include href=
"version-info.xml" xpointer=
"v227"/>
1705 <term><command>switch-root
</command> <optional><replaceable>ROOT
</replaceable> <optional><replaceable>INIT
</replaceable></optional></optional></term>
1708 <para>Switches to a different root directory and executes a new system manager process below it.
1709 This is intended for use in the initrd, and will transition from the initrd's system manager
1710 process (a.k.a.
"init" process, PID
1) to the main system manager process which is loaded from
1711 the actual host root files system. This call takes two arguments: the directory that is to become
1712 the new root directory, and the path to the new system manager binary below it to execute as PID
1713 1. If both are omitted or the former is an empty string it defaults to
1714 <filename>/sysroot/
</filename>. If the latter is omitted or is an empty string, a systemd binary
1715 will automatically be searched for and used as service manager. If the system manager path is
1716 omitted, equal to the empty string or identical to the path to the systemd binary, the state of
1717 the initrd's system manager process is passed to the main system manager, which allows later
1718 introspection of the state of the services involved in the initrd boot phase.
</para>
1720 <xi:include href=
"version-info.xml" xpointer=
"v209"/>
1725 <term><command>suspend
</command></term>
1728 <para>Suspend the system. This will trigger activation of the special target unit
1729 <filename>suspend.target
</filename>. This command is asynchronous, and will return after the suspend
1730 operation is successfully enqueued. It will not wait for the suspend/resume cycle to complete.
</para>
1735 <term><command>hibernate
</command></term>
1738 <para>Hibernate the system. This will trigger activation of the special target unit
1739 <filename>hibernate.target
</filename>. This command is asynchronous, and will return after the hibernation
1740 operation is successfully enqueued. It will not wait for the hibernate/thaw cycle to complete.
</para>
1745 <term><command>hybrid-sleep
</command></term>
1748 <para>Hibernate and suspend the system. This will trigger activation of the special target unit
1749 <filename>hybrid-sleep.target
</filename>. This command is asynchronous, and will return after the hybrid
1750 sleep operation is successfully enqueued. It will not wait for the sleep/wake-up cycle to complete.
</para>
1752 <xi:include href=
"version-info.xml" xpointer=
"v196"/>
1757 <term><command>suspend-then-hibernate
</command></term>
1760 <para>Suspend the system and hibernate it after the delay specified in
<filename>systemd-sleep.conf
</filename>.
1761 This will trigger activation of the special target unit
<filename>suspend-then-hibernate.target
</filename>.
1762 This command is asynchronous, and will return after the hybrid sleep operation is successfully enqueued.
1763 It will not wait for the sleep/wake-up or hibernate/thaw cycle to complete.
</para>
1765 <xi:include href=
"version-info.xml" xpointer=
"v240"/>
1772 <title>Parameter Syntax
</title>
1774 <para>Unit commands listed above take either a single unit name (designated as
<replaceable>UNIT
</replaceable>),
1775 or multiple unit specifications (designated as
<replaceable>PATTERN
</replaceable>…). In the first case, the
1776 unit name with or without a suffix must be given. If the suffix is not specified (unit name is
"abbreviated"),
1777 systemctl will append a suitable suffix,
<literal>.service
</literal> by default, and a type-specific suffix in
1778 case of commands which operate only on specific unit types. For example,
1779 <programlisting># systemctl start sshd
</programlisting> and
1780 <programlisting># systemctl start sshd.service
</programlisting>
1781 are equivalent, as are
1782 <programlisting># systemctl isolate default
</programlisting>
1784 <programlisting># systemctl isolate default.target
</programlisting>
1785 Note that (absolute) paths to device nodes are automatically converted to device unit names, and other (absolute)
1786 paths to mount unit names.
1787 <programlisting># systemctl status /dev/sda
1788 # systemctl status /home
</programlisting>
1790 <programlisting># systemctl status dev-sda.device
1791 # systemctl status home.mount
</programlisting>
1792 In the second case, shell-style globs will be matched against the primary names of all units currently in memory;
1793 literal unit names, with or without a suffix, will be treated as in the first case. This means that literal unit
1794 names always refer to exactly one unit, but globs may match zero units and this is not considered an
1797 <para>Glob patterns use
1798 <citerefentry project='man-pages'
><refentrytitle>fnmatch
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1799 so normal shell-style globbing rules are used, and
1800 <literal>*
</literal>,
<literal>?
</literal>,
1801 <literal>[]
</literal> may be used. See
1802 <citerefentry project='man-pages'
><refentrytitle>glob
</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1803 for more details. The patterns are matched against the primary names of
1804 units currently in memory, and patterns which do not match anything
1805 are silently skipped. For example:
1806 <programlisting># systemctl stop sshd@*.service
</programlisting>
1807 will stop all
<filename>sshd@.service
</filename> instances. Note that alias names of units, and units that aren't
1808 in memory are not considered for glob expansion.
1811 <para>For unit file commands, the specified
<replaceable>UNIT
</replaceable> should be the name of the unit file
1812 (possibly abbreviated, see above), or the absolute path to the unit file:
1813 <programlisting># systemctl enable foo.service
</programlisting>
1815 <programlisting># systemctl link /path/to/foo.service
</programlisting>
1822 <title>Options
</title>
1824 <para>The following options are understood:
</para>
1828 <term><option>-t
</option></term>
1829 <term><option>--type=
</option></term>
1832 <para>The argument is a comma-separated list of unit types such as
<option>service
</option> and
1833 <option>socket
</option>. When units are listed with
<command>list-units
</command>,
1834 <command>list-dependencies
</command>,
<command>show
</command>, or
<command>status
</command>,
1835 only units of the specified types will be shown. By default, units of all types are shown.
</para>
1837 <para>As a special case, if one of the arguments is
<option>help
</option>, a list of allowed values
1838 will be printed and the program will exit.
</para>
1843 <term><option>--state=
</option></term>
1846 <para>The argument is a comma-separated list of unit LOAD, SUB, or ACTIVE states. When listing
1847 units with
<command>list-units
</command>,
<command>list-dependencies
</command>,
<command>show
</command>
1848 or
<command>status
</command>, show only those in the specified states. Use
<option>--state=failed
</option>
1849 or
<option>--failed
</option> to show only failed units.
</para>
1851 <para>As a special case, if one of the arguments is
<option>help
</option>, a list of allowed values
1852 will be printed and the program will exit.
</para>
1854 <xi:include href=
"version-info.xml" xpointer=
"v206"/>
1859 <term><option>-p
</option></term>
1860 <term><option>--property=
</option></term>
1863 <para>When showing unit/job/manager properties with the
1864 <command>show
</command> command, limit display to properties
1865 specified in the argument. The argument should be a
1866 comma-separated list of property names, such as
1867 <literal>MainPID
</literal>. Unless specified, all known
1868 properties are shown. If specified more than once, all
1869 properties with the specified names are shown. Shell
1870 completion is implemented for property names.
</para>
1872 <para>For the manager itself,
1873 <command>systemctl show
</command>
1874 will show all available properties, most of which are derived or closely match the options described in
1875 <citerefentry><refentrytitle>systemd-system.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
1878 <para>Properties for units vary by unit type, so showing any
1879 unit (even a non-existent one) is a way to list properties
1880 pertaining to this type. Similarly, showing any job will list
1881 properties pertaining to all jobs. Properties for units are
1883 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1884 and the pages for individual unit types
1885 <citerefentry><refentrytitle>systemd.service
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1886 <citerefentry><refentrytitle>systemd.socket
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1892 <term><option>-P
</option></term>
1895 <para>Equivalent to
<option>--value
</option> <option>--property=
</option>, i.e. shows the
1896 value of the property without the property name or
<literal>=
</literal>. Note that using
1897 <option>-P
</option> once will also affect all properties listed with
1898 <option>-p
</option>/
<option>--property=
</option>.
</para>
1900 <xi:include href=
"version-info.xml" xpointer=
"v246"/>
1905 <term><option>-a
</option></term>
1906 <term><option>--all
</option></term>
1909 <para>When listing units with
<command>list-units
</command>, also show inactive units and
1910 units which are following other units. When showing unit/job/manager properties, show all
1911 properties regardless whether they are set or not.
</para>
1913 <para>To list all units installed in the file system, use the
1914 <command>list-unit-files
</command> command instead.
</para>
1916 <para>When listing units with
<command>list-dependencies
</command>, recursively show
1917 dependencies of all dependent units (by default only dependencies of target units are
1920 <para>When used with
<command>status
</command>, show journal messages in full, even if they include
1921 unprintable characters or are very long. By default, fields with unprintable characters are
1922 abbreviated as
"blob data". (Note that the pager may escape unprintable characters again.)
</para>
1927 <term><option>-r
</option></term>
1928 <term><option>--recursive
</option></term>
1931 <para>When listing units, also show units of local
1932 containers. Units of local containers will be prefixed with
1933 the container name, separated by a single colon character
1934 (
<literal>:
</literal>).
</para>
1936 <xi:include href=
"version-info.xml" xpointer=
"v212"/>
1941 <term><option>--reverse
</option></term>
1944 <para>Show reverse dependencies between units with
1945 <command>list-dependencies
</command>, i.e. follow
1946 dependencies of type
<varname>WantedBy=
</varname>,
1947 <varname>RequiredBy=
</varname>,
<varname>UpheldBy=
</varname>,
1948 <varname>PartOf=
</varname>,
<varname>BoundBy=
</varname>,
1949 instead of
<varname>Wants=
</varname> and similar.
1952 <xi:include href=
"version-info.xml" xpointer=
"v203"/>
1957 <term><option>--after
</option></term>
1960 <para>With
<command>list-dependencies
</command>, show the
1961 units that are ordered before the specified unit. In other
1962 words, recursively list units following the
1963 <varname>After=
</varname> dependency.
</para>
1965 <para>Note that any
<varname>After=
</varname> dependency is
1966 automatically mirrored to create a
1967 <varname>Before=
</varname> dependency. Temporal dependencies
1968 may be specified explicitly, but are also created implicitly
1969 for units which are
<varname>WantedBy=
</varname> targets
1971 <citerefentry><refentrytitle>systemd.target
</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
1972 and as a result of other directives (for example
1973 <varname>RequiresMountsFor=
</varname>). Both explicitly
1974 and implicitly introduced dependencies are shown with
1975 <command>list-dependencies
</command>.
</para>
1977 <para>When passed to the
<command>list-jobs
</command> command, for each printed job show which other jobs are
1978 waiting for it. May be combined with
<option>--before
</option> to show both the jobs waiting for each job as
1979 well as all jobs each job is waiting for.
</para>
1981 <xi:include href=
"version-info.xml" xpointer=
"v203"/>
1986 <term><option>--before
</option></term>
1989 <para>With
<command>list-dependencies
</command>, show the
1990 units that are ordered after the specified unit. In other
1991 words, recursively list units following the
1992 <varname>Before=
</varname> dependency.
</para>
1994 <para>When passed to the
<command>list-jobs
</command> command, for each printed job show which other jobs it
1995 is waiting for. May be combined with
<option>--after
</option> to show both the jobs waiting for each job as
1996 well as all jobs each job is waiting for.
</para>
1998 <xi:include href=
"version-info.xml" xpointer=
"v212"/>
2003 <term><option>--with-dependencies
</option></term>
2006 <para>When used with
<command>status
</command>,
2007 <command>cat
</command>,
<command>list-units
</command>, and
2008 <command>list-unit-files
</command>, those commands print all
2009 specified units and the dependencies of those units.
</para>
2011 <para>Options
<option>--reverse
</option>,
2012 <option>--after
</option>,
<option>--before
</option>
2013 may be used to change what types of dependencies
2016 <xi:include href=
"version-info.xml" xpointer=
"v245"/>
2021 <term><option>-l
</option></term>
2022 <term><option>--full
</option></term>
2025 <para>Do not ellipsize unit names, process tree entries,
2026 journal output, or truncate unit descriptions in the output
2027 of
<command>status
</command>,
<command>list-units
</command>,
2028 <command>list-jobs
</command>, and
2029 <command>list-timers
</command>.
</para>
2030 <para>Also, show installation targets in the output of
2031 <command>is-enabled
</command>.
</para>
2036 <term><option>--value
</option></term>
2039 <para>When printing properties with
<command>show
</command>, only print the value, and skip the
2040 property name and
<literal>=
</literal>. Also see option
<option>-P
</option> above.
</para>
2042 <xi:include href=
"version-info.xml" xpointer=
"v230"/>
2047 <term><option>--show-types
</option></term>
2050 <para>When showing sockets, show the type of the socket.
</para>
2052 <xi:include href=
"version-info.xml" xpointer=
"v202"/>
2057 <term><option>--job-mode=
</option></term>
2060 <para>When queuing a new job, this option controls how to deal with
2061 already queued jobs. It takes one of
<literal>fail
</literal>,
2062 <literal>replace
</literal>,
2063 <literal>replace-irreversibly
</literal>,
2064 <literal>isolate
</literal>,
2065 <literal>ignore-dependencies
</literal>,
2066 <literal>ignore-requirements
</literal>,
2067 <literal>flush
</literal>,
2068 <literal>triggering
</literal>, or
2069 <literal>restart-dependencies
</literal>. Defaults to
2070 <literal>replace
</literal>, except when the
2071 <command>isolate
</command> command is used which implies the
2072 <literal>isolate
</literal> job mode.
</para>
2074 <para>If
<literal>fail
</literal> is specified and a requested
2075 operation conflicts with a pending job (more specifically:
2076 causes an already pending start job to be reversed into a stop
2077 job or vice versa), cause the operation to fail.
</para>
2079 <para>If
<literal>replace
</literal> (the default) is
2080 specified, any conflicting pending job will be replaced, as
2083 <para>If
<literal>replace-irreversibly
</literal> is specified,
2084 operate like
<literal>replace
</literal>, but also mark the new
2085 jobs as irreversible. This prevents future conflicting
2086 transactions from replacing these jobs (or even being enqueued
2087 while the irreversible jobs are still pending). Irreversible
2088 jobs can still be cancelled using the
<command>cancel
</command>
2089 command. This job mode should be used on any transaction which
2090 pulls in
<filename>shutdown.target
</filename>.
</para>
2092 <para><literal>isolate
</literal> is only valid for start
2093 operations and causes all other units to be stopped when the
2094 specified unit is started. This mode is always used when the
2095 <command>isolate
</command> command is used.
</para>
2097 <para><literal>flush
</literal> will cause all queued jobs to
2098 be canceled when the new job is enqueued.
</para>
2100 <para>If
<literal>ignore-dependencies
</literal> is specified,
2101 then all unit dependencies are ignored for this new job and
2102 the operation is executed immediately. If passed, no required
2103 units of the unit passed will be pulled in, and no ordering
2104 dependencies will be honored. This is mostly a debugging and
2105 rescue tool for the administrator and should not be used by
2106 applications.
</para>
2108 <para><literal>ignore-requirements
</literal> is similar to
2109 <literal>ignore-dependencies
</literal>, but only causes the
2110 requirement dependencies to be ignored, the ordering
2111 dependencies will still be honored.
</para>
2113 <para><literal>triggering
</literal> may only be used with
2114 <command>systemctl stop
</command>. In this mode, the specified
2115 unit and any active units that trigger it are stopped. See the
2117 <varname>Triggers=
</varname> in
<citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
2118 for more information about triggering units.
</para>
2120 <para><literal>restart-dependencies
</literal> may only be used with
2121 <command>systemctl start
</command>. In this mode, dependencies of
2122 the specified unit will receive restart propagation, as if a restart
2123 job had been enqueued for the unit.
</para>
2125 <xi:include href=
"version-info.xml" xpointer=
"v209"/>
2130 <term><option>-T
</option></term>
2131 <term><option>--show-transaction
</option></term>
2134 <para>When enqueuing a unit job (for example as effect of a
<command>systemctl start
</command>
2135 invocation or similar), show brief information about all jobs enqueued, covering both the requested
2136 job and any added because of unit dependencies. Note that the output will only include jobs
2137 immediately part of the transaction requested. It is possible that service start-up program code
2138 run as effect of the enqueued jobs might request further jobs to be pulled in. This means that
2139 completion of the listed jobs might ultimately entail more jobs than the listed ones.
</para>
2141 <xi:include href=
"version-info.xml" xpointer=
"v242"/>
2146 <term><option>--fail
</option></term>
2149 <para>Shorthand for
<option>--job-mode=
</option>fail.
</para>
2150 <para>When used with the
<command>kill
</command> command,
2151 if no units were killed, the operation results in an error.
2154 <xi:include href=
"version-info.xml" xpointer=
"v227"/>
2159 <term><option>--check-inhibitors=
</option></term>
2162 <para>When system shutdown or sleep state is requested, this option controls checking of inhibitor
2163 locks. It takes one of
<literal>auto
</literal>,
<literal>yes
</literal> or
2164 <literal>no
</literal>. Defaults to
<literal>auto
</literal>, which will behave like
2165 <literal>yes
</literal> for interactive invocations (i.e. from a TTY) and
<literal>no
</literal> for
2166 non-interactive invocations.
<literal>yes
</literal> lets the request respect inhibitor locks.
2167 <literal>no
</literal> lets the request ignore inhibitor locks.
</para>
2169 <para>Applications can establish inhibitor locks to prevent certain important operations (such as
2170 CD burning) from being interrupted by system shutdown or sleep. Any user may take these locks and
2171 privileged users may override these locks. If any locks are taken, shutdown and sleep state
2172 requests will normally fail (unless privileged). However, if
<literal>no
</literal> is specified or
2173 <literal>auto
</literal> is specified on a non-interactive requests, the operation will be
2174 attempted. If locks are present, the operation may require additional privileges.
</para>
2176 <para>Option
<option>--force
</option> provides another way to override inhibitors.
</para>
2178 <xi:include href=
"version-info.xml" xpointer=
"v248"/>
2183 <term><option>-i
</option></term>
2186 <para>Shortcut for
<option>--check-inhibitors=no
</option>.
</para>
2188 <xi:include href=
"version-info.xml" xpointer=
"v198"/>
2193 <term><option>--dry-run
</option></term>
2196 <para>Just print what would be done. Currently supported by verbs
2197 <command>halt
</command>,
<command>poweroff
</command>,
<command>reboot
</command>,
2198 <command>kexec
</command>,
<command>suspend
</command>,
<command>hibernate
</command>,
2199 <command>hybrid-sleep
</command>,
<command>suspend-then-hibernate
</command>,
2200 <command>default
</command>,
<command>rescue
</command>,
2201 <command>emergency
</command>, and
<command>exit
</command>.
</para>
2203 <xi:include href=
"version-info.xml" xpointer=
"v236"/>
2208 <term><option>-q
</option></term>
2209 <term><option>--quiet
</option></term>
2212 <para>Suppress printing of the results of various commands
2213 and also the hints about truncated log lines. This does not
2214 suppress output of commands for which the printed output is
2215 the only result (like
<command>show
</command>). Errors are
2216 always printed.
</para>
2221 <term><option>--no-warn
</option></term>
2224 <para>Don't generate the warnings shown by default in the following cases:
2227 <para>when
<command>systemctl
</command> is invoked without procfs mounted on
2228 <filename>/proc/
</filename>,
</para>
2231 <para>when using
<command>enable
</command> or
<command>disable
</command> on units without
2232 install information (i.e. don't have or have an empty [Install] section),
</para>
2235 <para>when using
<command>disable
</command> combined with
<option>--user
</option> on units
2236 that are enabled in global scope.
</para>
2241 <xi:include href=
"version-info.xml" xpointer=
"v253"/>
2246 <term><option>--no-block
</option></term>
2249 <para>Do not synchronously wait for the requested operation
2250 to finish. If this is not specified, the job will be
2251 verified, enqueued and
<command>systemctl
</command> will
2252 wait until the unit's start-up is completed. By passing this
2253 argument, it is only verified and enqueued. This option may not be
2254 combined with
<option>--wait
</option>.
</para>
2259 <term><option>--wait
</option></term>
2262 <para>Synchronously wait for started units to terminate again.
2263 This option may not be combined with
<option>--no-block
</option>.
2264 Note that this will wait forever if any given unit never terminates
2265 (by itself or by getting stopped explicitly); particularly services
2266 which use
<literal>RemainAfterExit=yes
</literal>.
</para>
2268 <para>When used with
<command>is-system-running
</command>, wait
2269 until the boot process is completed before returning.
</para>
2271 <xi:include href=
"version-info.xml" xpointer=
"v232"/>
2275 <xi:include href=
"user-system-options.xml" xpointer=
"user" />
2276 <xi:include href=
"user-system-options.xml" xpointer=
"system" />
2279 <term><option>--failed
</option></term>
2282 <para>List units in failed state. This is equivalent to
2283 <option>--state=failed
</option>.
</para>
2285 <xi:include href=
"version-info.xml" xpointer=
"v233"/>
2290 <term><option>--no-wall
</option></term>
2293 <para>Do not send wall message before halt, power-off and reboot.
</para>
2298 <term><option>--global
</option></term>
2301 <para>When used with
<command>enable
</command> and
2302 <command>disable
</command>, operate on the global user
2303 configuration directory, thus enabling or disabling a unit
2304 file globally for all future logins of all users.
</para>
2309 <term><option>--no-reload
</option></term>
2312 <para>When used with
<command>enable
</command> and
2313 <command>disable
</command>, do not implicitly reload daemon
2314 configuration after executing the changes.
</para>
2319 <term><option>--no-ask-password
</option></term>
2322 <para>When used with
<command>start
</command> and related
2323 commands, disables asking for passwords. Background services
2324 may require input of a password or passphrase string, for
2325 example to unlock system hard disks or cryptographic
2326 certificates. Unless this option is specified and the
2327 command is invoked from a terminal,
2328 <command>systemctl
</command> will query the user on the
2329 terminal for the necessary secrets. Use this option to
2330 switch this behavior off. In this case, the password must be
2331 supplied by some other means (for example graphical password
2332 agents) or the service might fail. This also disables
2333 querying the user for authentication for privileged
2339 <term><option>--kill-whom=
</option></term>
2342 <para>When used with
<command>kill
</command>, choose which processes to send a UNIX process signal
2343 to. Must be one of
<option>main
</option>,
<option>control
</option> or
<option>all
</option> to
2344 select whether to kill only the main process, the control process or all processes of the unit. The
2345 main process of the unit is the one that defines the life-time of it. A control process of a unit
2346 is one that is invoked by the manager to induce state changes of it. For example, all processes
2347 started due to the
<varname>ExecStartPre=
</varname>,
<varname>ExecStop=
</varname> or
2348 <varname>ExecReload=
</varname> settings of service units are control processes. Note that there is
2349 only one control process per unit at a time, as only one state change is executed at a time. For
2350 services of type
<varname>Type=forking
</varname>, the initial process started by the manager for
2351 <varname>ExecStart=
</varname> is a control process, while the process ultimately forked off by that
2352 one is then considered the main process of the unit (if it can be determined). This is different
2353 for service units of other types, where the process forked off by the manager for
2354 <varname>ExecStart=
</varname> is always the main process itself. A service unit consists of zero or
2355 one main process, zero or one control process plus any number of additional processes. Not all unit
2356 types manage processes of these types however. For example, for mount units, control processes are
2357 defined (which are the invocations of
<filename>&MOUNT_PATH;</filename> and
2358 <filename>&UMOUNT_PATH;</filename>), but no main process is defined. If omitted, defaults to
2359 <option>all
</option>.
</para>
2361 <xi:include href=
"version-info.xml" xpointer=
"v252"/>
2366 <term><option>--kill-value=
</option><replaceable>INT
</replaceable></term>
2368 <listitem><para>If used with the
<command>kill
</command> command, enqueues a signal along with the
2369 specified integer value parameter to the specified process(es). This operation is only available for
2370 POSIX Realtime Signals (i.e.
<option>--signal=SIGRTMIN+…
</option> or
2371 <option>--signal=SIGRTMAX-…
</option>), and ensures the signals are generated via the
<citerefentry
2372 project='man-pages'
><refentrytitle>sigqueue
</refentrytitle><manvolnum>3</manvolnum></citerefentry>
2373 system call, rather than
<citerefentry
2374 project='man-pages'
><refentrytitle>kill
</refentrytitle><manvolnum>3</manvolnum></citerefentry>. The
2375 specified value must be a
32-bit signed integer, and may be specified either in decimal, in
2376 hexadecimal (if prefixed with
<literal>0x
</literal>), octal (if prefixed with
<literal>0o
</literal>)
2377 or binary (if prefixed with
<literal>0b
</literal>)
</para>
2379 <para>If this option is used the signal will only be enqueued on the control or main process of the
2380 unit, never on other processes belonging to the unit, i.e.
<option>--kill-whom=all
</option> will only
2381 affect main and control processes but no other processes.
</para>
2383 <xi:include href=
"version-info.xml" xpointer=
"v254"/></listitem>
2386 <xi:include href=
"standard-options.xml" xpointer=
"signal" />
2389 <term><option>--what=
</option></term>
2392 <para>Select what type of per-unit resources to remove when the
<command>clean
</command> command is
2393 invoked, see above. Takes one of
<constant>configuration
</constant>,
<constant>state
</constant>,
2394 <constant>cache
</constant>,
<constant>logs
</constant>,
<constant>runtime
</constant>,
2395 <constant>fdstore
</constant> to select the type of resource. This option may be specified more than
2396 once, in which case all specified resource types are removed. Also accepts the special value
2397 <constant>all
</constant> as a shortcut for specifying all six resource types. If this option is not
2398 specified defaults to the combination of
<constant>cache
</constant>,
<constant>runtime
</constant>
2399 and
<constant>fdstore
</constant>, i.e. the three kinds of resources that are generally considered
2400 to be redundant and can be reconstructed on next invocation. Note that the explicit removal of the
2401 <constant>fdstore
</constant> resource type is only useful if the
2402 <varname>FileDescriptorStorePreserve=
</varname> option is enabled, since the file descriptor store
2403 is otherwise cleaned automatically when the unit is stopped.
</para>
2405 <xi:include href=
"version-info.xml" xpointer=
"v243"/>
2410 <term><option>-f
</option></term>
2411 <term><option>--force
</option></term>
2414 <para>When used with
<command>enable
</command>, overwrite
2415 any existing conflicting symlinks.
</para>
2417 <para>When used with
<command>edit
</command>, create all of the
2418 specified units which do not already exist.
</para>
2420 <para>When used with
<command>halt
</command>,
<command>poweroff
</command>,
<command>reboot
</command> or
2421 <command>kexec
</command>, execute the selected operation without shutting down all units. However, all
2422 processes will be killed forcibly and all file systems are unmounted or remounted read-only. This is hence a
2423 drastic but relatively safe option to request an immediate reboot. If
<option>--force
</option> is specified
2424 twice for these operations (with the exception of
<command>kexec
</command>), they will be executed
2425 immediately, without terminating any processes or unmounting any file systems. Warning: specifying
2426 <option>--force
</option> twice with any of these operations might result in data loss. Note that when
2427 <option>--force
</option> is specified twice the selected operation is executed by
2428 <command>systemctl
</command> itself, and the system manager is not contacted. This means the command should
2429 succeed even when the system manager has crashed.
</para>
2434 <term><option>--message=
</option></term>
2437 <para>When used with
<command>halt
</command>,
<command>poweroff
</command> or
<command>reboot
</command>, set a
2438 short message explaining the reason for the operation. The message will be logged together with the default
2439 shutdown message.
</para>
2441 <xi:include href=
"version-info.xml" xpointer=
"v225"/>
2446 <term><option>--now
</option></term>
2449 <para>When used with
<command>enable
</command>, the units
2450 will also be started. When used with
<command>disable
</command> or
2451 <command>mask
</command>, the units will also be stopped. The start
2452 or stop operation is only carried out when the respective enable or
2453 disable operation has been successful.
</para>
2455 <xi:include href=
"version-info.xml" xpointer=
"v220"/>
2460 <term><option>--root=
</option></term>
2463 <para>When used with
2464 <command>enable
</command>/
<command>disable
</command>/
<command>is-enabled
</command>
2465 (and related commands), use the specified root path when looking for unit
2466 files. If this option is present,
<command>systemctl
</command> will operate on
2467 the file system directly, instead of communicating with the
<command>systemd
</command>
2468 daemon to carry out changes.
</para>
2474 <term><option>--image=
<replaceable>image
</replaceable></option></term>
2476 <listitem><para>Takes a path to a disk image file or block device node. If specified, all operations
2477 are applied to file system in the indicated disk image. This option is similar to
2478 <option>--root=
</option>, but operates on file systems stored in disk images or block devices. The
2479 disk image should either contain just a file system or a set of file systems within a GPT partition
2480 table, following the
<ulink url=
"https://uapi-group.org/specifications/specs/discoverable_partitions_specification">Discoverable Partitions
2481 Specification
</ulink>. For further information on supported disk images, see
2482 <citerefentry><refentrytitle>systemd-nspawn
</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s
2483 switch of the same name.
</para>
2485 <xi:include href=
"version-info.xml" xpointer=
"v252"/></listitem>
2488 <xi:include href=
"standard-options.xml" xpointer=
"image-policy-open" />
2491 <term><option>--runtime
</option></term>
2494 <para>When used with
<command>enable
</command>,
2495 <command>disable
</command>,
<command>edit
</command>,
2496 (and related commands), make changes only temporarily, so
2497 that they are lost on the next reboot. This will have the
2498 effect that changes are not made in subdirectories of
2499 <filename>/etc/
</filename> but in
<filename>/run/
</filename>,
2500 with identical immediate effects, however, since the latter
2501 is lost on reboot, the changes are lost too.
</para>
2503 <para>Similarly, when used with
2504 <command>set-property
</command>, make changes only
2505 temporarily, so that they are lost on the next
2511 <term><option>--preset-mode=
</option></term>
2514 <para>Takes one of
<literal>full
</literal> (the default),
2515 <literal>enable-only
</literal>,
2516 <literal>disable-only
</literal>. When used with the
2517 <command>preset
</command> or
<command>preset-all
</command>
2518 commands, controls whether units shall be disabled and
2519 enabled according to the preset rules, or only enabled, or
2520 only disabled.
</para>
2522 <xi:include href=
"version-info.xml" xpointer=
"v215"/>
2527 <term><option>-n
</option></term>
2528 <term><option>--lines=
</option></term>
2531 <para>When used with
<command>status
</command>, controls the number of journal lines to show,
2532 counting from the most recent ones. Takes a positive integer argument, or
0 to disable journal
2533 output. Defaults to
10.
</para>
2538 <term><option>-o
</option></term>
2539 <term><option>--output=
</option></term>
2542 <para>When used with
<command>status
</command>, controls the
2543 formatting of the journal entries that are shown. For the
2544 available choices, see
2545 <citerefentry><refentrytitle>journalctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
2546 Defaults to
<literal>short
</literal>.
</para>
2551 <term><option>--firmware-setup
</option></term>
2554 <para>When used with the
<command>reboot
</command> command, indicate to the system's firmware to
2555 reboot into the firmware setup interface. Note that this functionality is not available on all
2558 <xi:include href=
"version-info.xml" xpointer=
"v220"/>
2563 <term><option>--boot-loader-menu=
<replaceable>timeout
</replaceable></option></term>
2566 <para>When used with the
<command>reboot
</command> command, indicate to the system's boot loader to
2567 show the boot loader menu on the following boot. Takes a time value as parameter — indicating the
2568 menu timeout. Pass zero in order to disable the menu timeout. Note that not all boot loaders
2569 support this functionality.
</para>
2571 <xi:include href=
"version-info.xml" xpointer=
"v242"/>
2576 <term><option>--boot-loader-entry=
<replaceable>ID
</replaceable></option></term>
2579 <para>When used with the
<command>reboot
</command> command, indicate to the system's boot loader to
2580 boot into a specific boot loader entry on the following boot. Takes a boot loader entry identifier
2581 as argument, or
<literal>help
</literal> in order to list available entries. Note that not all boot
2582 loaders support this functionality.
</para>
2584 <xi:include href=
"version-info.xml" xpointer=
"v242"/>
2589 <term><option>--reboot-argument=
</option></term>
2592 <para>This switch is used with
<command>reboot
</command>. The value is architecture and firmware specific. As an example,
<literal>recovery
</literal>
2593 might be used to trigger system recovery, and
<literal>fota
</literal> might be used to trigger a
2594 <quote>firmware over the air
</quote> update.
</para>
2596 <xi:include href=
"version-info.xml" xpointer=
"v246"/>
2601 <term><option>--plain
</option></term>
2604 <para>When used with
<command>list-dependencies
</command>,
2605 <command>list-units
</command> or
<command>list-machines
</command>,
2606 the output is printed as a list instead of a tree, and the bullet
2607 circles are omitted.
</para>
2609 <xi:include href=
"version-info.xml" xpointer=
"v203"/>
2614 <term><option>--timestamp=
</option></term>
2617 <para>Change the format of printed timestamps. The following values may be used:
2622 <term><option>pretty
</option> (this is the default)
</term>
2623 <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS TZ
</literal></para>
2625 <xi:include href=
"version-info.xml" xpointer=
"v248"/></listitem>
2631 <term><option>unix
</option></term>
2632 <listitem><para><literal>@seconds-since-the-epoch
</literal></para>
2634 <xi:include href=
"version-info.xml" xpointer=
"v251"/></listitem>
2640 <term><option>us
</option></term>
2641 <term><option>μs
</option></term>
2642 <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS.UUUUUU TZ
</literal></para>
2644 <xi:include href=
"version-info.xml" xpointer=
"v248"/></listitem>
2650 <term><option>utc
</option></term>
2651 <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS UTC
</literal></para>
2653 <xi:include href=
"version-info.xml" xpointer=
"v248"/></listitem>
2659 <term><option>us+utc
</option></term>
2660 <term><option>μs+utc
</option></term>
2661 <listitem><para><literal>Day YYYY-MM-DD HH:MM:SS.UUUUUU UTC
</literal></para>
2663 <xi:include href=
"version-info.xml" xpointer=
"v248"/></listitem>
2667 <xi:include href=
"version-info.xml" xpointer=
"v247"/>
2672 <term><option>--mkdir
</option></term>
2674 <listitem><para>When used with
<command>bind
</command>, creates the destination file or directory before
2675 applying the bind mount. Note that even though the name of this option suggests that it is suitable only for
2676 directories, this option also creates the destination file node to mount over if the object to mount is not
2677 a directory, but a regular file, device node, socket or FIFO.
</para>
2679 <xi:include href=
"version-info.xml" xpointer=
"v248"/></listitem>
2683 <term><option>--marked
</option></term>
2685 <listitem><para>Only allowed with
<command>reload-or-restart
</command>. Enqueues restart jobs for all
2686 units that have the
<literal>needs-restart
</literal> mark, and reload jobs for units that have the
2687 <literal>needs-reload
</literal> mark. When a unit marked for reload does not support reload, restart
2688 will be queued. Those properties can be set using
<command>set-property Markers=…
</command>.
</para>
2690 <para>Unless
<option>--no-block
</option> is used,
<command>systemctl
</command> will wait for the
2691 queued jobs to finish.
</para>
2693 <xi:include href=
"version-info.xml" xpointer=
"v248"/></listitem>
2697 <term><option>--read-only
</option></term>
2699 <listitem><para>When used with
<command>bind
</command>, creates a read-only bind mount.
</para>
2701 <xi:include href=
"version-info.xml" xpointer=
"v248"/></listitem>
2705 <term><option>--drop-in=
</option></term>
2708 <para>When used with
<command>edit
</command>, use the given drop-in file name instead of
2709 <filename>override.conf
</filename>.
</para>
2711 <xi:include href=
"version-info.xml" xpointer=
"v253"/>
2716 <term><option>--when=
</option></term>
2719 <para>When used with
<command>halt
</command>,
<command>poweroff
</command>,
<command>reboot
</command>
2720 or
<command>kexec
</command>, schedule the action to be performed at the given timestamp,
2721 which should adhere to the syntax documented in
<citerefentry
2722 project='man-pages'
><refentrytitle>systemd.time
</refentrytitle><manvolnum>7</manvolnum></citerefentry>
2723 section
"PARSING TIMESTAMPS". Specially, if
<literal>show
</literal> is given, the currently scheduled
2724 action will be shown, which can be canceled by passing an empty string or
<literal>cancel
</literal>.
</para>
2726 <xi:include href=
"version-info.xml" xpointer=
"v254"/>
2730 <xi:include href=
"user-system-options.xml" xpointer=
"host" />
2731 <xi:include href=
"user-system-options.xml" xpointer=
"machine" />
2733 <xi:include href=
"standard-options.xml" xpointer=
"no-pager" />
2734 <xi:include href=
"standard-options.xml" xpointer=
"legend" />
2735 <xi:include href=
"standard-options.xml" xpointer=
"help" />
2736 <xi:include href=
"standard-options.xml" xpointer=
"version" />
2741 <title>Exit status
</title>
2743 <para>On success,
0 is returned, a non-zero failure code otherwise.
</para>
2745 <para><command>systemctl
</command> uses the return codes defined by LSB, as defined in
2746 <ulink url=
"http://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/iniscrptact.html">LSB
3.0.0</ulink>.
2750 <title>LSB return codes
</title>
2755 <entry>Value
</entry>
2756 <entry>Description in LSB
</entry>
2757 <entry>Use in systemd
</entry>
2762 <entry><constant>0</constant></entry>
2763 <entry>"program is running or service is OK"</entry>
2764 <entry>unit is active
</entry>
2767 <entry><constant>1</constant></entry>
2768 <entry>"program is dead and <filename>/var/run</filename> pid file exists"</entry>
2769 <entry>unit
<emphasis>not
</emphasis> failed (used by
<command>is-failed
</command>)
</entry>
2772 <entry><constant>2</constant></entry>
2773 <entry>"program is dead and <filename>/var/lock</filename> lock file exists"</entry>
2774 <entry>unused
</entry>
2777 <entry><constant>3</constant></entry>
2778 <entry>"program is not running"</entry>
2779 <entry>unit is not active
</entry>
2782 <entry><constant>4</constant></entry>
2783 <entry>"program or service status is unknown"</entry>
2784 <entry>no such unit
</entry>
2790 <para>The mapping of LSB service states to systemd unit states is imperfect, so it is better to
2791 not rely on those return values but to look for specific unit states and substates instead.
2796 <title>Environment
</title>
2798 <variablelist class='environment-variables'
>
2800 <term><varname>$SYSTEMD_EDITOR
</varname></term>
2802 <listitem><para>Editor to use when editing units; overrides
2803 <varname>$EDITOR
</varname> and
<varname>$VISUAL
</varname>. If neither
2804 <varname>$SYSTEMD_EDITOR
</varname> nor
<varname>$EDITOR
</varname> nor
2805 <varname>$VISUAL
</varname> are present or if it is set to an empty
2806 string or if their execution failed, systemctl will try to execute well
2807 known editors in this order:
2808 <citerefentry project='die-net'
><refentrytitle>editor
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2809 <citerefentry project='die-net'
><refentrytitle>nano
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2810 <citerefentry project='die-net'
><refentrytitle>vim
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2811 <citerefentry project='die-net'
><refentrytitle>vi
</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
2814 <xi:include href=
"version-info.xml" xpointer=
"v218"/></listitem>
2816 <xi:include href=
"common-variables.xml" xpointer=
"log-level"/>
2817 <xi:include href=
"common-variables.xml" xpointer=
"log-color"/>
2818 <xi:include href=
"common-variables.xml" xpointer=
"log-time"/>
2819 <xi:include href=
"common-variables.xml" xpointer=
"log-location"/>
2820 <xi:include href=
"common-variables.xml" xpointer=
"log-target"/>
2821 <xi:include href=
"common-variables.xml" xpointer=
"pager"/>
2822 <xi:include href=
"common-variables.xml" xpointer=
"less"/>
2823 <xi:include href=
"common-variables.xml" xpointer=
"lesscharset"/>
2824 <xi:include href=
"common-variables.xml" xpointer=
"lesssecure"/>
2825 <xi:include href=
"common-variables.xml" xpointer=
"colors"/>
2826 <xi:include href=
"common-variables.xml" xpointer=
"urlify"/>
2831 <title>See Also
</title>
2833 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2834 <citerefentry><refentrytitle>journalctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2835 <citerefentry><refentrytitle>loginctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2836 <citerefentry><refentrytitle>machinectl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2837 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2838 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2839 <citerefentry><refentrytitle>systemd.special
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
2840 <citerefentry project='man-pages'
><refentrytitle>wall
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
2841 <citerefentry><refentrytitle>systemd.preset
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
2842 <citerefentry><refentrytitle>systemd.generator
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
2843 <citerefentry project='man-pages'
><refentrytitle>glob
</refentrytitle><manvolnum>7</manvolnum></citerefentry>