1 <?xml version='
1.0'
?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM
"custom-entities.ent" >
9 This file is part of systemd.
11 Copyright 2010 Lennart Poettering
13 systemd is free software; you can redistribute it and/or modify it
14 under the terms of the GNU Lesser General Public License as published by
15 the Free Software Foundation; either version 2.1 of the License, or
16 (at your option) any later version.
18 systemd is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
23 You should have received a copy of the GNU Lesser General Public License
24 along with systemd; If not, see <http://www.gnu.org/licenses/>.
27 <refentry id=
"systemctl"
28 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
31 <title>systemctl
</title>
32 <productname>systemd
</productname>
36 <contrib>Developer
</contrib>
37 <firstname>Lennart
</firstname>
38 <surname>Poettering
</surname>
39 <email>lennart@poettering.net
</email>
45 <refentrytitle>systemctl
</refentrytitle>
46 <manvolnum>1</manvolnum>
50 <refname>systemctl
</refname>
51 <refpurpose>Control the systemd system and service manager
</refpurpose>
56 <command>systemctl
</command>
57 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
58 <arg choice=
"plain">COMMAND
</arg>
59 <arg choice=
"opt" rep=
"repeat">NAME
</arg>
64 <title>Description
</title>
66 <para><command>systemctl
</command> may be used to introspect and
67 control the state of the
<literal>systemd
</literal> system and
68 service manager. Please refer to
69 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
70 for an introduction into the basic concepts and functionality this
75 <title>Options
</title>
77 <para>The following options are understood:
</para>
81 <term><option>-t
</option></term>
82 <term><option>--type=
</option></term>
85 <para>The argument should be a comma-separated list of unit
86 types such as
<option>service
</option> and
87 <option>socket
</option>.
90 <para>If one of the arguments is a unit type, when listing
91 units, limit display to certain unit types. Otherwise, units
92 of all types will be shown.
</para>
94 <para>As a special case, if one of the arguments is
95 <option>help
</option>, a list of allowed values will be
96 printed and the program will exit.
</para>
101 <term><option>--state=
</option></term>
104 <para>The argument should be a comma-separated list of unit
105 LOAD, SUB, or ACTIVE states. When listing units, show only
106 those in the specified states. Use
<option>--state=failed
</option>
107 to show only failed units.
</para>
109 <para>As a special case, if one of the arguments is
110 <option>help
</option>, a list of allowed values will be
111 printed and the program will exit.
</para>
116 <term><option>-p
</option></term>
117 <term><option>--property=
</option></term>
120 <para>When showing unit/job/manager properties with the
121 <command>show
</command> command, limit display to properties
122 specified in the argument. The argument should be a
123 comma-separated list of property names, such as
124 <literal>MainPID
</literal>. Unless specified, all known
125 properties are shown. If specified more than once, all
126 properties with the specified names are shown. Shell
127 completion is implemented for property names.
</para>
129 <para>For the manager itself,
130 <command>systemctl show
</command> will show all available
131 properties. Those properties are documented in
132 <citerefentry><refentrytitle>systemd-system.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
135 <para>Properties for units vary by unit type, so showing any
136 unit (even a non-existent one) is a way to list properties
137 pertaining to this type. Similarly, showing any job will list
138 properties pertaining to all jobs. Properties for units are
140 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
141 and the pages for individual unit types
142 <citerefentry><refentrytitle>systemd.service
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
143 <citerefentry><refentrytitle>systemd.socket
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
149 <term><option>-a
</option></term>
150 <term><option>--all
</option></term>
153 <para>When listing units, show all loaded units, regardless
154 of their state, including inactive units. When showing
155 unit/job/manager properties, show all properties regardless
156 whether they are set or not.
</para>
157 <para>To list all units installed on the system, use the
158 <command>list-unit-files
</command> command instead.
</para>
163 <term><option>-r
</option></term>
164 <term><option>--recursive
</option></term>
167 <para>When listing units, also show units of local
168 containers. Units of local containers will be prefixed with
169 the container name, separated by a single colon character
170 (
<literal>:
</literal>).
</para>
175 <term><option>--reverse
</option></term>
178 <para>Show reverse dependencies between units with
179 <command>list-dependencies
</command>, i.e. follow
180 dependencies of type
<varname>WantedBy=
</varname>,
181 <varname>RequiredBy=
</varname>,
182 <varname>PartOf=
</varname>,
<varname>BoundBy=
</varname>,
183 instead of
<varname>Wants=
</varname> and similar.
189 <term><option>--after
</option></term>
192 <para>With
<command>list-dependencies
</command>, show the
193 units that are ordered before the specified unit. In other
194 words, recursively list units following the
195 <varname>After=
</varname> dependency.
</para>
197 <para>Note that any
<varname>After=
</varname> dependency is
198 automatically mirrored to create a
199 <varname>Before=
</varname> dependency. Temporal dependencies
200 may be specified explicitly, but are also created implicitly
201 for units which are
<varname>WantedBy=
</varname> targets
203 <citerefentry><refentrytitle>systemd.target
</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
204 and as a result of other directives (for example
205 <varname>RequiresMountsFor=
</varname>). Both explicitly
206 and implicitly introduced dependencies are shown with
207 <command>list-dependencies
</command>.
</para>
212 <term><option>--before
</option></term>
215 <para>With
<command>list-dependencies
</command>, show the
216 units that are ordered after the specified unit. In other
217 words, recursively list units following the
218 <varname>Before=
</varname> dependency.
</para>
223 <term><option>-l
</option></term>
224 <term><option>--full
</option></term>
227 <para>Do not ellipsize unit names, process tree entries,
228 journal output, or truncate unit descriptions in the output
229 of
<command>status
</command>,
<command>list-units
</command>,
230 <command>list-jobs
</command>, and
231 <command>list-timers
</command>.
</para>
236 <term><option>--show-types
</option></term>
239 <para>When showing sockets, show the type of the socket.
</para>
244 <term><option>--job-mode=
</option></term>
247 <para>When queuing a new job, this option controls how to deal with
248 already queued jobs. It takes one of
<literal>fail
</literal>,
249 <literal>replace
</literal>,
250 <literal>replace-irreversibly
</literal>,
251 <literal>isolate
</literal>,
252 <literal>ignore-dependencies
</literal>,
253 <literal>ignore-requirements
</literal> or
254 <literal>flush
</literal>. Defaults to
255 <literal>replace
</literal>, except when the
256 <command>isolate
</command> command is used which implies the
257 <literal>isolate
</literal> job mode.
</para>
259 <para>If
<literal>fail
</literal> is specified and a requested
260 operation conflicts with a pending job (more specifically:
261 causes an already pending start job to be reversed into a stop
262 job or vice versa), cause the operation to fail.
</para>
264 <para>If
<literal>replace
</literal> (the default) is
265 specified, any conflicting pending job will be replaced, as
268 <para>If
<literal>replace-irreversibly
</literal> is specified,
269 operate like
<literal>replace
</literal>, but also mark the new
270 jobs as irreversible. This prevents future conflicting
271 transactions from replacing these jobs (or even being enqueued
272 while the irreversible jobs are still pending). Irreversible
273 jobs can still be cancelled using the
<command>cancel
</command>
276 <para><literal>isolate
</literal> is only valid for start
277 operations and causes all other units to be stopped when the
278 specified unit is started. This mode is always used when the
279 <command>isolate
</command> command is used.
</para>
281 <para><literal>flush
</literal> will cause all queued jobs to
282 be canceled when the new job is enqueued.
</para>
284 <para>If
<literal>ignore-dependencies
</literal> is specified,
285 then all unit dependencies are ignored for this new job and
286 the operation is executed immediately. If passed, no required
287 units of the unit passed will be pulled in, and no ordering
288 dependencies will be honored. This is mostly a debugging and
289 rescue tool for the administrator and should not be used by
292 <para><literal>ignore-requirements
</literal> is similar to
293 <literal>ignore-dependencies
</literal>, but only causes the
294 requirement dependencies to be ignored, the ordering
295 dependencies will still be honoured.
</para>
301 <term><option>--fail
</option></term>
304 <para>Shorthand for
<option>--job-mode=
</option>fail.
</para>
305 <para>When used with the
<command>kill
</command> command,
306 if no units were killed, the operation results in an error.
312 <term><option>-i
</option></term>
313 <term><option>--ignore-inhibitors
</option></term>
316 <para>When system shutdown or a sleep state is requested,
317 ignore inhibitor locks. Applications can establish inhibitor
318 locks to avoid that certain important operations (such as CD
319 burning or suchlike) are interrupted by system shutdown or a
320 sleep state. Any user may take these locks and privileged
321 users may override these locks. If any locks are taken,
322 shutdown and sleep state requests will normally fail
323 (regardless of whether privileged or not) and a list of active locks
324 is printed. However, if
<option>--ignore-inhibitors
</option>
325 is specified, the locks are ignored and not printed, and the
326 operation attempted anyway, possibly requiring additional
332 <term><option>-q
</option></term>
333 <term><option>--quiet
</option></term>
336 <para>Suppress printing of the results of various commands
337 and also the hints about truncated log lines. This does not
338 suppress output of commands for which the printed output is
339 the only result (like
<command>show
</command>). Errors are
340 always printed.
</para>
345 <term><option>--no-block
</option></term>
348 <para>Do not synchronously wait for the requested operation
349 to finish. If this is not specified, the job will be
350 verified, enqueued and
<command>systemctl
</command> will
351 wait until the unit's start-up is completed. By passing this
352 argument, it is only verified and enqueued.
</para>
356 <xi:include href=
"user-system-options.xml" xpointer=
"user" />
357 <xi:include href=
"user-system-options.xml" xpointer=
"system" />
359 <!-- we do not document -failed here, as it has been made
360 redundant by -state=failed, which it predates. To keep
361 things simple, we only document the new switch, while
362 keeping the old one around for compatibility only. -->
365 <term><option>--no-wall
</option></term>
368 <para>Do not send wall message before halt, power-off,
374 <term><option>--global
</option></term>
377 <para>When used with
<command>enable
</command> and
378 <command>disable
</command>, operate on the global user
379 configuration directory, thus enabling or disabling a unit
380 file globally for all future logins of all users.
</para>
385 <term><option>--no-reload
</option></term>
388 <para>When used with
<command>enable
</command> and
389 <command>disable
</command>, do not implicitly reload daemon
390 configuration after executing the changes.
</para>
395 <term><option>--no-ask-password
</option></term>
398 <para>When used with
<command>start
</command> and related
399 commands, disables asking for passwords. Background services
400 may require input of a password or passphrase string, for
401 example to unlock system hard disks or cryptographic
402 certificates. Unless this option is specified and the
403 command is invoked from a terminal,
404 <command>systemctl
</command> will query the user on the
405 terminal for the necessary secrets. Use this option to
406 switch this behavior off. In this case, the password must be
407 supplied by some other means (for example graphical password
408 agents) or the service might fail. This also disables
409 querying the user for authentication for privileged
415 <term><option>--kill-who=
</option></term>
418 <para>When used with
<command>kill
</command>, choose which
419 processes to send a signal to. Must be one of
420 <option>main
</option>,
<option>control
</option> or
421 <option>all
</option> to select whether to kill only the main
422 process, the control process or all processes of the
423 unit. The main process of the unit is the one that defines
424 the life-time of it. A control process of a unit is one that
425 is invoked by the manager to induce state changes of it. For
426 example, all processes started due to the
427 <varname>ExecStartPre=
</varname>,
428 <varname>ExecStop=
</varname> or
429 <varname>ExecReload=
</varname> settings of service units are
430 control processes. Note that there is only one control
431 process per unit at a time, as only one state change is
432 executed at a time. For services of type
433 <varname>Type=forking
</varname>, the initial process started
434 by the manager for
<varname>ExecStart=
</varname> is a
435 control process, while the process ultimately forked off by
436 that one is then considered the main process of the unit (if
437 it can be determined). This is different for service units
438 of other types, where the process forked off by the manager
439 for
<varname>ExecStart=
</varname> is always the main process
440 itself. A service unit consists of zero or one main process,
441 zero or one control process plus any number of additional
442 processes. Not all unit types manage processes of these
443 types however. For example, for mount units, control processes
444 are defined (which are the invocations of
445 <filename>&MOUNT_PATH;</filename> and
446 <filename>&UMOUNT_PATH;</filename>), but no main process
447 is defined. If omitted, defaults to
448 <option>all
</option>.
</para>
454 <term><option>-s
</option></term>
455 <term><option>--signal=
</option></term>
458 <para>When used with
<command>kill
</command>, choose which
459 signal to send to selected processes. Must be one of the
460 well-known signal specifiers such as
<constant>SIGTERM
</constant>,
<constant>SIGINT
</constant> or
461 <constant>SIGSTOP
</constant>. If omitted, defaults to
462 <option>SIGTERM
</option>.
</para>
467 <term><option>-f
</option></term>
468 <term><option>--force
</option></term>
471 <para>When used with
<command>enable
</command>, overwrite
472 any existing conflicting symlinks.
</para>
474 <para>When used with
<command>halt
</command>,
475 <command>poweroff
</command>,
<command>reboot
</command> or
476 <command>kexec
</command>, execute the selected operation
477 without shutting down all units. However, all processes will
478 be killed forcibly and all file systems are unmounted or
479 remounted read-only. This is hence a drastic but relatively
480 safe option to request an immediate reboot. If
481 <option>--force
</option> is specified twice for these
482 operations, they will be executed immediately without
483 terminating any processes or unmounting any file
484 systems. Warning: specifying
<option>--force
</option> twice
485 with any of these operations might result in data
491 <term><option>--message=
</option></term>
494 <para>When used with
<command>halt
</command>,
495 <command>poweroff
</command>,
<command>reboot
</command> or
496 <command>kexec
</command>, set a short message explaining the reason
497 for the operation. The message will be logged together with the
498 default shutdown message.
</para>
503 <term><option>--now
</option></term>
506 <para>When used with
<command>enable
</command>, the units
507 will also be started. When used with
<command>disable
</command> or
508 <command>mask
</command>, the units will also be stopped. The start
509 or stop operation is only carried out when the respective enable or
510 disable operation has been successful.
</para>
515 <term><option>--root=
</option></term>
519 <command>enable
</command>/
<command>disable
</command>/
<command>is-enabled
</command>
520 (and related commands), use an alternate root path when
521 looking for unit files.
</para>
527 <term><option>--runtime
</option></term>
530 <para>When used with
<command>enable
</command>,
531 <command>disable
</command>,
<command>edit
</command>,
532 (and related commands), make changes only temporarily, so
533 that they are lost on the next reboot. This will have the
534 effect that changes are not made in subdirectories of
535 <filename>/etc
</filename> but in
<filename>/run
</filename>,
536 with identical immediate effects, however, since the latter
537 is lost on reboot, the changes are lost too.
</para>
539 <para>Similarly, when used with
540 <command>set-property
</command>, make changes only
541 temporarily, so that they are lost on the next
547 <term><option>--preset-mode=
</option></term>
550 <para>Takes one of
<literal>full
</literal> (the default),
551 <literal>enable-only
</literal>,
552 <literal>disable-only
</literal>. When used with the
553 <command>preset
</command> or
<command>preset-all
</command>
554 commands, controls whether units shall be disabled and
555 enabled according to the preset rules, or only enabled, or
556 only disabled.
</para>
561 <term><option>-n
</option></term>
562 <term><option>--lines=
</option></term>
565 <para>When used with
<command>status
</command>, controls the
566 number of journal lines to show, counting from the most
567 recent ones. Takes a positive integer argument. Defaults to
573 <term><option>-o
</option></term>
574 <term><option>--output=
</option></term>
577 <para>When used with
<command>status
</command>, controls the
578 formatting of the journal entries that are shown. For the
579 available choices, see
580 <citerefentry><refentrytitle>journalctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
581 Defaults to
<literal>short
</literal>.
</para>
586 <term><option>--firmware-setup
</option></term>
589 <para>When used with the
<command>reboot
</command> command,
590 indicate to the system's firmware to boot into setup
591 mode. Note that this is currently only supported on some EFI
592 systems and only if the system was booted in EFI
598 <term><option>--plain
</option></term>
601 <para>When used with
<command>list-dependencies
</command>,
602 <command>list-units
</command> or
<command>list-machines
</command>, the
603 the output is printed as a list instead of a tree, and the bullet
604 circles are omitted.
</para>
608 <xi:include href=
"user-system-options.xml" xpointer=
"host" />
609 <xi:include href=
"user-system-options.xml" xpointer=
"machine" />
611 <xi:include href=
"standard-options.xml" xpointer=
"no-pager" />
612 <xi:include href=
"standard-options.xml" xpointer=
"no-legend" />
613 <xi:include href=
"standard-options.xml" xpointer=
"help" />
614 <xi:include href=
"standard-options.xml" xpointer=
"version" />
619 <title>Commands
</title>
621 <para>The following commands are understood:
</para>
624 <title>Unit Commands
</title>
628 <term><command>list-units
<optional><replaceable>PATTERN
</replaceable>...
</optional></command></term>
631 <para>List known units (subject to limitations specified
632 with
<option>-t
</option>). If one or more
633 <replaceable>PATTERN
</replaceable>s are specified, only
634 units matching one of them are shown.
</para>
636 <para>This is the default command.
</para>
641 <term><command>list-sockets
<optional><replaceable>PATTERN
</replaceable>...
</optional></command></term>
644 <para>List socket units ordered by listening address.
645 If one or more
<replaceable>PATTERN
</replaceable>s are
646 specified, only socket units matching one of them are
647 shown. Produces output similar to
649 LISTEN UNIT ACTIVATES
650 /dev/initctl systemd-initctl.socket systemd-initctl.service
652 [::]:
22 sshd.socket sshd.service
653 kobject-uevent
1 systemd-udevd-kernel.socket systemd-udevd.service
655 5 sockets listed.
</programlisting>
656 Note: because the addresses might contains spaces, this output
657 is not suitable for programmatic consumption.
660 <para>See also the options
<option>--show-types
</option>,
661 <option>--all
</option>, and
<option>--state=
</option>.
</para>
666 <term><command>list-timers
<optional><replaceable>PATTERN
</replaceable>...
</optional></command></term>
669 <para>List timer units ordered by the time they elapse
670 next. If one or more
<replaceable>PATTERN
</replaceable>s
671 are specified, only units matching one of them are shown.
674 <para>See also the options
<option>--all
</option> and
675 <option>--state=
</option>.
</para>
680 <term><command>start
<replaceable>PATTERN
</replaceable>...
</command></term>
683 <para>Start (activate) one or more units specified on the
686 <para>Note that glob patterns operate on the set of primary names of currently loaded units. Units which
687 are not active and are not in a failed state usually are not loaded, and will not be matched by any
688 pattern. In addition, in case of instantiated units, systemd is often unaware of the instance name until
689 the instance has been started. Therefore, using glob patterns with
<command>start
</command> has limited
690 usefulness. Also, secondary alias names of units are not considered.
</para>
694 <term><command>stop
<replaceable>PATTERN
</replaceable>...
</command></term>
697 <para>Stop (deactivate) one or more units specified on the
702 <term><command>reload
<replaceable>PATTERN
</replaceable>...
</command></term>
705 <para>Asks all units listed on the command line to reload
706 their configuration. Note that this will reload the
707 service-specific configuration, not the unit configuration
708 file of systemd. If you want systemd to reload the
709 configuration file of a unit, use the
710 <command>daemon-reload
</command> command. In other words:
711 for the example case of Apache, this will reload Apache's
712 <filename>httpd.conf
</filename> in the web server, not the
713 <filename>apache.service
</filename> systemd unit
716 <para>This command should not be confused with the
717 <command>daemon-reload
</command> command.
</para>
722 <term><command>restart
<replaceable>PATTERN
</replaceable>...
</command></term>
725 <para>Restart one or more units specified on the command
726 line. If the units are not running yet, they will be
731 <term><command>try-restart
<replaceable>PATTERN
</replaceable>...
</command></term>
734 <para>Restart one or more units specified on the command
735 line if the units are running. This does nothing if units are not
737 <!-- Note that we don't document condrestart here, as that is just compatibility support, and we generally
738 don't document that. -->
742 <term><command>reload-or-restart
<replaceable>PATTERN
</replaceable>...
</command></term>
745 <para>Reload one or more units if they support it. If not,
746 restart them instead. If the units are not running yet, they
747 will be started.
</para>
751 <term><command>try-reload-or-restart
<replaceable>PATTERN
</replaceable>...
</command></term>
754 <para>Reload one or more units if they support it. If not,
755 restart them instead. This does nothing if the units are not
757 <!-- Note that we don't document force-reload here, as that is just compatibility support, and we generally
758 don't document that. -->
762 <term><command>isolate
<replaceable>NAME
</replaceable></command></term>
765 <para>Start the unit specified on the command line and its
766 dependencies and stop all others. If a unit name with no
767 extension is given, an extension of
768 <literal>.target
</literal> will be assumed.
</para>
770 <para>This is similar to changing the runlevel in a
771 traditional init system. The
<command>isolate
</command>
772 command will immediately stop processes that are not enabled
773 in the new unit, possibly including the graphical
774 environment or terminal you are currently using.
</para>
776 <para>Note that this is allowed only on units where
777 <option>AllowIsolate=
</option> is enabled. See
778 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
783 <term><command>kill
<replaceable>PATTERN
</replaceable>...
</command></term>
786 <para>Send a signal to one or more processes of the
787 unit. Use
<option>--kill-who=
</option> to select which
788 process to kill. Use
<option>--signal=
</option> to select
789 the signal to send.
</para>
793 <term><command>is-active
<replaceable>PATTERN
</replaceable>...
</command></term>
796 <para>Check whether any of the specified units are active
797 (i.e. running). Returns an exit code
798 <constant>0</constant> if at least one is active, or
799 non-zero otherwise. Unless
<option>--quiet
</option> is
800 specified, this will also print the current unit state to
801 standard output.
</para>
805 <term><command>is-failed
<replaceable>PATTERN
</replaceable>...
</command></term>
808 <para>Check whether any of the specified units are in a
809 "failed" state. Returns an exit code
810 <constant>0</constant> if at least one has failed,
811 non-zero otherwise. Unless
<option>--quiet
</option> is
812 specified, this will also print the current unit state to
813 standard output.
</para>
817 <term><command>status
</command> <optional><replaceable>PATTERN
</replaceable>...|
<replaceable>PID
</replaceable>...]
</optional></term>
820 <para>Show terse runtime status information about one or
821 more units, followed by most recent log data from the
822 journal. If no units are specified, show system status. If
823 combined with
<option>--all
</option>, also show the status of
824 all units (subject to limitations specified with
825 <option>-t
</option>). If a PID is passed, show information
826 about the unit the process belongs to.
</para>
828 <para>This function is intended to generate human-readable
829 output. If you are looking for computer-parsable output,
830 use
<command>show
</command> instead. By default, this
831 function only shows
10 lines of output and ellipsizes
832 lines to fit in the terminal window. This can be changed
833 with
<option>--lines
</option> and
<option>--full
</option>,
834 see above. In addition,
<command>journalctl
835 --unit=
<replaceable>NAME
</replaceable></command> or
837 --user-unit=
<replaceable>NAME
</replaceable></command> use
838 a similar filter for messages and might be more
844 <term><command>show
</command> <optional><replaceable>PATTERN
</replaceable>...|
<replaceable>JOB
</replaceable>...
</optional></term>
847 <para>Show properties of one or more units, jobs, or the
848 manager itself. If no argument is specified, properties of
849 the manager will be shown. If a unit name is specified,
850 properties of the unit is shown, and if a job ID is
851 specified, properties of the job is shown. By default, empty
852 properties are suppressed. Use
<option>--all
</option> to
853 show those too. To select specific properties to show, use
854 <option>--property=
</option>. This command is intended to be
855 used whenever computer-parsable output is required. Use
856 <command>status
</command> if you are looking for formatted
857 human-readable output.
</para>
861 <term><command>cat
<replaceable>PATTERN
</replaceable>...
</command></term>
864 <para>Show backing files of one or more units. Prints the
865 "fragment" and
"drop-ins" (source files) of units. Each
866 file is preceded by a comment which includes the file
871 <term><command>set-property
<replaceable>NAME
</replaceable> <replaceable>ASSIGNMENT
</replaceable>...
</command></term>
874 <para>Set the specified unit properties at runtime where
875 this is supported. This allows changing configuration
876 parameter properties such as resource control settings at
877 runtime. Not all properties may be changed at runtime, but
878 many resource control settings (primarily those in
879 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
880 may. The changes are applied instantly, and stored on disk
881 for future boots, unless
<option>--runtime
</option> is
882 passed, in which case the settings only apply until the
883 next reboot. The syntax of the property assignment follows
884 closely the syntax of assignments in unit files.
</para>
886 <para>Example:
<command>systemctl set-property foobar.service CPUShares=
777</command></para>
888 <para>If the specified unit appears to be inactive, the
889 changes will be only stored on disk as described
890 previously hence they will be effective when the unit will
893 <para>Note that this command allows changing multiple
894 properties at the same time, which is preferable over
895 setting them individually. Like unit file configuration
896 settings, assigning the empty list to list parameters will
897 reset the list.
</para>
902 <term><command>help
<replaceable>PATTERN
</replaceable>...|
<replaceable>PID
</replaceable>...
</command></term>
905 <para>Show manual pages for one or more units, if
906 available. If a PID is given, the manual pages for the unit
907 the process belongs to are shown.
</para>
912 <term><command>reset-failed [
<replaceable>PATTERN
</replaceable>...]
</command></term>
915 <para>Reset the
<literal>failed
</literal> state of the
916 specified units, or if no unit name is passed, reset the state of all
917 units. When a unit fails in some way (i.e. process exiting
918 with non-zero error code, terminating abnormally or timing
919 out), it will automatically enter the
920 <literal>failed
</literal> state and its exit code and status
921 is recorded for introspection by the administrator until the
922 service is restarted or reset with this command.
</para>
928 <command>list-dependencies
</command>
929 <optional><replaceable>NAME
</replaceable></optional>
933 <para>Shows units required and wanted by the specified
934 unit. This recursively lists units following the
935 <varname>Requires=
</varname>,
936 <varname>Requisite=
</varname>,
937 <varname>ConsistsOf=
</varname>,
938 <varname>Wants=
</varname>,
<varname>BindsTo=
</varname>
939 dependencies. If no unit is specified,
940 <filename>default.target
</filename> is implied.
</para>
942 <para>By default, only target units are recursively
943 expanded. When
<option>--all
</option> is passed, all other
944 units are recursively expanded as well.
</para>
946 <para>Options
<option>--reverse
</option>,
947 <option>--after
</option>,
<option>--before
</option>
948 may be used to change what types of dependencies
956 <title>Unit File Commands
</title>
960 <term><command>list-unit-files
<optional><replaceable>PATTERN...
</replaceable></optional></command></term>
963 <para>List installed unit files and their enablement state
964 (as reported by
<command>is-enabled
</command>). If one or
965 more
<replaceable>PATTERN
</replaceable>s are specified,
966 only units whose filename (just the last component of the
967 path) matches one of them are shown.
</para>
972 <term><command>enable
<replaceable>NAME
</replaceable>...
</command></term>
975 <para>Enable one or more unit files or unit file instances,
976 as specified on the command line. This will create a number
977 of symlinks as encoded in the
<literal>[Install]
</literal>
978 sections of the unit files. After the symlinks have been
979 created, the systemd configuration is reloaded (in a way that
980 is equivalent to
<command>daemon-reload
</command>) to ensure
981 the changes are taken into account immediately. Note that
982 this does
<emphasis>not
</emphasis> have the effect of also
983 starting any of the units being enabled. If this
984 is desired, either
<option>--now
</option> should be used
985 together with this command, or an additional
<command>start
</command>
986 command must be invoked for the unit. Also note that, in case of
987 instance enablement, symlinks named the same as instances
988 are created in the install location, however they all point to the
989 same template unit file.
</para>
991 <para>This command will print the actions executed. This
992 output may be suppressed by passing
<option>--quiet
</option>.
995 <para>Note that this operation creates only the suggested
996 symlinks for the units. While this command is the
997 recommended way to manipulate the unit configuration
998 directory, the administrator is free to make additional
999 changes manually by placing or removing symlinks in the
1000 directory. This is particularly useful to create
1001 configurations that deviate from the suggested default
1002 installation. In this case, the administrator must make sure
1003 to invoke
<command>daemon-reload
</command> manually as
1004 necessary to ensure the changes are taken into account.
1007 <para>Enabling units should not be confused with starting
1008 (activating) units, as done by the
<command>start
</command>
1009 command. Enabling and starting units is orthogonal: units
1010 may be enabled without being started and started without
1011 being enabled. Enabling simply hooks the unit into various
1012 suggested places (for example, so that the unit is
1013 automatically started on boot or when a particular kind of
1014 hardware is plugged in). Starting actually spawns the daemon
1015 process (in case of service units), or binds the socket (in
1016 case of socket units), and so on.
</para>
1018 <para>Depending on whether
<option>--system
</option>,
1019 <option>--user
</option>,
<option>--runtime
</option>,
1020 or
<option>--global
</option> is specified, this enables the unit
1021 for the system, for the calling user only, for only this boot of
1022 the system, or for all future logins of all users, or only this
1023 boot. Note that in the last case, no systemd daemon
1024 configuration is reloaded.
</para>
1026 <para>Using
<command>enable
</command> on masked units
1027 results in an error.
</para>
1032 <term><command>disable
<replaceable>NAME
</replaceable>...
</command></term>
1035 <para>Disables one or more units. This removes all symlinks
1036 to the specified unit files from the unit configuration
1037 directory, and hence undoes the changes made by
1038 <command>enable
</command>. Note however that this removes
1039 all symlinks to the unit files (i.e. including manual
1040 additions), not just those actually created by
1041 <command>enable
</command>. This call implicitly reloads the
1042 systemd daemon configuration after completing the disabling
1043 of the units. Note that this command does not implicitly
1044 stop the units that are being disabled. If this is desired, either
1045 <option>--now
</option> should be used together with this command, or
1046 an additional
<command>stop
</command> command should be executed
1049 <para>This command will print the actions executed. This
1050 output may be suppressed by passing
<option>--quiet
</option>.
1053 <para>This command honors
<option>--system
</option>,
1054 <option>--user
</option>,
<option>--runtime
</option> and
1055 <option>--global
</option> in a similar way as
1056 <command>enable
</command>.
</para>
1061 <term><command>reenable
<replaceable>NAME
</replaceable>...
</command></term>
1064 <para>Reenable one or more unit files, as specified on the
1065 command line. This is a combination of
1066 <command>disable
</command> and
<command>enable
</command> and
1067 is useful to reset the symlinks a unit is enabled with to
1068 the defaults configured in the
<literal>[Install]
</literal>
1069 section of the unit file.
</para>
1074 <term><command>preset
<replaceable>NAME
</replaceable>...
</command></term>
1077 <para>Reset one or more unit files, as specified on the
1078 command line, to the defaults configured in the preset
1079 policy files. This has the same effect as
1080 <command>disable
</command> or
<command>enable
</command>,
1081 depending how the unit is listed in the preset files.
</para>
1083 <para>Use
<option>--preset-mode=
</option> to control
1084 whether units shall be enabled and disabled, or only
1085 enabled, or only disabled.
</para>
1087 <para>For more information on the preset policy format,
1089 <citerefentry><refentrytitle>systemd.preset
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
1090 For more information on the concept of presets, please
1092 url=
"http://freedesktop.org/wiki/Software/systemd/Preset">Preset
</ulink>
1098 <term><command>preset-all
</command></term>
1101 <para>Resets all installed unit files to the defaults
1102 configured in the preset policy file (see above).
</para>
1104 <para>Use
<option>--preset-mode=
</option> to control
1105 whether units shall be enabled and disabled, or only
1106 enabled, or only disabled.
</para>
1111 <term><command>is-enabled
<replaceable>NAME
</replaceable>...
</command></term>
1114 <para>Checks whether any of the specified unit files are
1115 enabled (as with
<command>enable
</command>). Returns an
1116 exit code of
0 if at least one is enabled, non-zero
1117 otherwise. Prints the current enable status (see table).
1118 To suppress this output, use
<option>--quiet
</option>.
1123 <command>is-enabled
</command> output
1130 <entry>Description
</entry>
1131 <entry>Exit Code
</entry>
1136 <entry><literal>enabled
</literal></entry>
1137 <entry morerows='
1'
>Enabled via
<filename>.wants/
</filename>,
<filename>.requires/
</filename> or alias symlinks (permanently in
<filename>/etc/systemd/system/
</filename>, or transiently in
<filename>/run/systemd/system/
</filename>).
</entry>
1138 <entry morerows='
1'
>0</entry>
1141 <entry><literal>enabled-runtime
</literal></entry>
1144 <entry><literal>linked
</literal></entry>
1145 <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>
1146 <entry morerows='
1'
>> 0</entry>
1149 <entry><literal>linked-runtime
</literal></entry>
1152 <entry><literal>masked
</literal></entry>
1153 <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>
1154 <entry morerows='
1'
>> 0</entry>
1157 <entry><literal>masked-runtime
</literal></entry>
1160 <entry><literal>static
</literal></entry>
1161 <entry>The unit file is not enabled, and has no provisions for enabling in the
<literal>[Install]
</literal> section.
</entry>
1165 <entry><literal>indirect
</literal></entry>
1166 <entry>The unit file itself is not enabled, but it has a non-empty
<varname>Also=
</varname> setting in the
<literal>[Install]
</literal> section, listing other unit files that might be enabled.
</entry>
1170 <entry><literal>disabled
</literal></entry>
1171 <entry>Unit file is not enabled, but contains an
<literal>[Install]
</literal> section with installation instructions.
</entry>
1172 <entry>> 0</entry>
1175 <entry><literal>bad
</literal></entry>
1176 <entry>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>
1177 <entry>> 0</entry>
1187 <term><command>mask
<replaceable>NAME
</replaceable>...
</command></term>
1190 <para>Mask one or more unit files, as specified on the
1191 command line. This will link these units to
1192 <filename>/dev/null
</filename>, making it impossible to
1193 start them. This is a stronger version of
1194 <command>disable
</command>, since it prohibits all kinds of
1195 activation of the unit, including enablement and manual
1196 activation. Use this option with care. This honors the
1197 <option>--runtime
</option> option to only mask temporarily
1198 until the next reboot of the system. The
<option>--now
</option>
1199 option can be used to ensure that the units are also stopped.
</para>
1204 <term><command>unmask
<replaceable>NAME
</replaceable>...
</command></term>
1207 <para>Unmask one or more unit files, as specified on the
1208 command line. This will undo the effect of
1209 <command>mask
</command>.
</para>
1214 <term><command>link
<replaceable>FILENAME
</replaceable>...
</command></term>
1217 <para>Link a unit file that is not in the unit file search
1218 paths into the unit file search path. This requires an
1219 absolute path to a unit file. The effect of this can be
1220 undone with
<command>disable
</command>. The effect of this
1221 command is that a unit file is available for
1222 <command>start
</command> and other commands although it
1223 is not installed directly in the unit search path.
</para>
1228 <term><command>add-wants
<replaceable>TARGET
</replaceable>
1229 <replaceable>NAME
</replaceable>...
</command></term>
1230 <term><command>add-requires
<replaceable>TARGET
</replaceable>
1231 <replaceable>NAME
</replaceable>...
</command></term>
1234 <para>Adds
<literal>Wants=
</literal> or
<literal>Requires=
</literal>
1235 dependencies, respectively, to the specified
1236 <replaceable>TARGET
</replaceable> for one or more units.
</para>
1238 <para>This command honors
<option>--system
</option>,
1239 <option>--user
</option>,
<option>--runtime
</option> and
1240 <option>--global
</option> in a way similar to
1241 <command>enable
</command>.
</para>
1247 <term><command>edit
<replaceable>NAME
</replaceable>...
</command></term>
1250 <para>Edit a drop-in snippet or a whole replacement file if
1251 <option>--full
</option> is specified, to extend or override the
1252 specified unit.
</para>
1254 <para>Depending on whether
<option>--system
</option> (the default),
1255 <option>--user
</option>, or
<option>--global
</option> is specified,
1256 this command creates a drop-in file for each unit either for the system,
1257 for the calling user, or for all futures logins of all users. Then,
1258 the editor (see the
"Environment" section below) is invoked on
1259 temporary files which will be written to the real location if the
1260 editor exits successfully.
</para>
1262 <para>If
<option>--full
</option> is specified, this will copy the
1263 original units instead of creating drop-in files.
</para>
1265 <para>If
<option>--runtime
</option> is specified, the changes will
1266 be made temporarily in
<filename>/run
</filename> and they will be
1267 lost on the next reboot.
</para>
1269 <para>If the temporary file is empty upon exit, the modification of
1270 the related unit is canceled.
</para>
1272 <para>After the units have been edited, systemd configuration is
1273 reloaded (in a way that is equivalent to
<command>daemon-reload
</command>).
1276 <para>Note that this command cannot be used to remotely edit units
1277 and that you cannot temporarily edit units which are in
1278 <filename>/etc
</filename>, since they take precedence over
1279 <filename>/run
</filename>.
</para>
1284 <term><command>get-default
</command></term>
1287 <para>Return the default target to boot into. This returns
1288 the target unit name
<filename>default.target
</filename>
1289 is aliased (symlinked) to.
</para>
1294 <term><command>set-default
<replaceable>NAME
</replaceable></command></term>
1297 <para>Set the default target to boot into. This sets
1298 (symlinks) the
<filename>default.target
</filename> alias
1299 to the given target unit.
</para>
1307 <title>Machine Commands
</title>
1311 <term><command>list-machines
<optional><replaceable>PATTERN
</replaceable>...
</optional></command></term>
1314 <para>List the host and all running local containers with
1315 their state. If one or more
1316 <replaceable>PATTERN
</replaceable>s are specified, only
1317 containers matching one of them are shown.
1325 <title>Job Commands
</title>
1329 <term><command>list-jobs
<optional><replaceable>PATTERN...
</replaceable></optional></command></term>
1332 <para>List jobs that are in progress. If one or more
1333 <replaceable>PATTERN
</replaceable>s are specified, only
1334 jobs for units matching one of them are shown.
</para>
1338 <term><command>cancel
<replaceable>JOB
</replaceable>...
</command></term>
1341 <para>Cancel one or more jobs specified on the command line
1342 by their numeric job IDs. If no job ID is specified, cancel
1343 all pending jobs.
</para>
1350 <title>Environment Commands
</title>
1354 <term><command>show-environment
</command></term>
1357 <para>Dump the systemd manager environment block. The
1358 environment block will be dumped in straight-forward form
1359 suitable for sourcing into a shell script. This environment
1360 block will be passed to all processes the manager
1365 <term><command>set-environment
<replaceable>VARIABLE=VALUE
</replaceable>...
</command></term>
1368 <para>Set one or more systemd manager environment variables,
1369 as specified on the command line.
</para>
1373 <term><command>unset-environment
<replaceable>VARIABLE
</replaceable>...
</command></term>
1376 <para>Unset one or more systemd manager environment
1377 variables. If only a variable name is specified, it will be
1378 removed regardless of its value. If a variable and a value
1379 are specified, the variable is only removed if it has the
1380 specified value.
</para>
1385 <command>import-environment
</command>
1386 <optional><replaceable>VARIABLE...
</replaceable></optional>
1390 <para>Import all, one or more environment variables set on
1391 the client into the systemd manager environment block. If
1392 no arguments are passed, the entire environment block is
1393 imported. Otherwise, a list of one or more environment
1394 variable names should be passed, whose client-side values
1395 are then imported into the manager's environment
1403 <title>Manager Lifecycle Commands
</title>
1407 <term><command>daemon-reload
</command></term>
1410 <para>Reload the systemd manager configuration. This will
1411 rerun all generators (see
1412 <citerefentry><refentrytitle>systemd.generator
</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
1413 reload all unit files, and recreate the entire dependency
1414 tree. While the daemon is being reloaded, all sockets
1415 systemd listens on behalf of user configuration will stay
1418 <para>This command should not be confused with the
1419 <command>reload
</command> command.
</para>
1423 <term><command>daemon-reexec
</command></term>
1426 <para>Reexecute the systemd manager. This will serialize the
1427 manager state, reexecute the process and deserialize the
1428 state again. This command is of little use except for
1429 debugging and package upgrades. Sometimes, it might be
1430 helpful as a heavy-weight
<command>daemon-reload
</command>.
1431 While the daemon is being reexecuted, all sockets systemd listening
1432 on behalf of user configuration will stay accessible.
1440 <title>System Commands
</title>
1444 <term><command>is-system-running
</command></term>
1447 <para>Checks whether the system is operational. This
1448 returns success (exit code
0) when the system is fully up
1449 and running, specifically not in startup, shutdown or
1450 maintenance mode, and with no failed services. Failure is
1451 returned otherwise (exit code non-zero). In addition, the
1452 current state is printed in a short string to standard
1453 output, see the table below. Use
<option>--quiet
</option> to
1454 suppress this output.
</para>
1457 <title><command>is-system-running
</command> output
</title>
1459 <colspec colname='name'
/>
1460 <colspec colname='description'
/>
1461 <colspec colname='exit-code'
/>
1465 <entry>Description
</entry>
1466 <entry>Exit Code
</entry>
1471 <entry><varname>initializing
</varname></entry>
1472 <entry><para>Early bootup, before
1473 <filename>basic.target
</filename> is reached
1474 or the
<varname>maintenance
</varname> state entered.
1476 <entry>> 0</entry>
1479 <entry><varname>starting
</varname></entry>
1480 <entry><para>Late bootup, before the job queue
1481 becomes idle for the first time, or one of the
1482 rescue targets are reached.
</para></entry>
1483 <entry>> 0</entry>
1486 <entry><varname>running
</varname></entry>
1487 <entry><para>The system is fully
1488 operational.
</para></entry>
1492 <entry><varname>degraded
</varname></entry>
1493 <entry><para>The system is operational but one or more
1494 units failed.
</para></entry>
1495 <entry>> 0</entry>
1498 <entry><varname>maintenance
</varname></entry>
1499 <entry><para>The rescue or emergency target is
1500 active.
</para></entry>
1501 <entry>> 0</entry>
1504 <entry><varname>stopping
</varname></entry>
1505 <entry><para>The manager is shutting
1506 down.
</para></entry>
1507 <entry>> 0</entry>
1510 <entry><varname>offline
</varname></entry>
1511 <entry><para>The manager is not
1512 running. Specifically, this is the operational
1513 state if an incompatible program is running as
1514 system manager (PID
1).
</para></entry>
1515 <entry>> 0</entry>
1518 <entry><varname>unknown
</varname></entry>
1519 <entry><para>The operational state could not be
1520 determined, due to lack of resources or another
1521 error cause.
</para></entry>
1522 <entry>> 0</entry>
1531 <term><command>default
</command></term>
1534 <para>Enter default mode. This is mostly equivalent to
1535 <command>isolate default.target
</command>.
</para>
1540 <term><command>rescue
</command></term>
1543 <para>Enter rescue mode. This is mostly equivalent to
1544 <command>isolate rescue.target
</command>, but also prints a
1545 wall message to all users.
</para>
1549 <term><command>emergency
</command></term>
1552 <para>Enter emergency mode. This is mostly equivalent to
1553 <command>isolate emergency.target
</command>, but also prints
1554 a wall message to all users.
</para>
1558 <term><command>halt
</command></term>
1561 <para>Shut down and halt the system. This is mostly equivalent to
1562 <command>start halt.target --job-mode=replace-irreversibly
</command>, but also
1563 prints a wall message to all users. If combined with
1564 <option>--force
</option>, shutdown of all running services is
1565 skipped, however all processes are killed and all file
1566 systems are unmounted or mounted read-only, immediately
1567 followed by the system halt. If
<option>--force
</option> is
1568 specified twice, the operation is immediately executed
1569 without terminating any processes or unmounting any file
1570 systems. This may result in data loss.
</para>
1574 <term><command>poweroff
</command></term>
1577 <para>Shut down and power-off the system. This is mostly
1578 equivalent to
<command>start poweroff.target --job-mode=replace-irreversibly
</command>,
1579 but also prints a wall message to all users. If combined with
1580 <option>--force
</option>, shutdown of all running services is
1581 skipped, however all processes are killed and all file
1582 systems are unmounted or mounted read-only, immediately
1583 followed by the powering off. If
<option>--force
</option> is
1584 specified twice, the operation is immediately executed
1585 without terminating any processes or unmounting any file
1586 systems. This may result in data loss.
</para>
1590 <term><command>reboot
<optional><replaceable>arg
</replaceable></optional></command></term>
1593 <para>Shut down and reboot the system. This is mostly
1594 equivalent to
<command>start reboot.target --job-mode=replace-irreversibly
</command>,
1595 but also prints a wall message to all users. If combined with
1596 <option>--force
</option>, shutdown of all running services is
1597 skipped, however all processes are killed and all file
1598 systems are unmounted or mounted read-only, immediately
1599 followed by the reboot. If
<option>--force
</option> is
1600 specified twice, the operation is immediately executed
1601 without terminating any processes or unmounting any file
1602 systems. This may result in data loss.
</para>
1604 <para>If the optional argument
1605 <replaceable>arg
</replaceable> is given, it will be passed
1606 as the optional argument to the
1607 <citerefentry><refentrytitle>reboot
</refentrytitle><manvolnum>2</manvolnum></citerefentry>
1608 system call. The value is architecture and firmware
1609 specific. As an example,
<literal>recovery
</literal> might
1610 be used to trigger system recovery, and
1611 <literal>fota
</literal> might be used to trigger a
1612 <quote>firmware over the air
</quote> update.
</para>
1617 <term><command>kexec
</command></term>
1620 <para>Shut down and reboot the system via kexec. This is
1621 mostly equivalent to
<command>start kexec.target --job-mode=replace-irreversibly
</command>,
1622 but also prints a wall message to all users. If combined
1623 with
<option>--force
</option>, shutdown of all running
1624 services is skipped, however all processes are killed and
1625 all file systems are unmounted or mounted read-only,
1626 immediately followed by the reboot.
</para>
1631 <term><command>exit
<optional><replaceable>EXIT_CODE
</replaceable></optional></command></term>
1634 <para>Ask the systemd manager to quit. This is only
1635 supported for user service managers (i.e. in conjunction
1636 with the
<option>--user
</option> option) or in containers
1637 and is equivalent to
<command>poweroff
</command> otherwise.
</para>
1639 <para>The systemd manager can exit with a non-zero exit
1640 code if the optional argument
1641 <replaceable>EXIT_CODE
</replaceable> is given.
</para>
1646 <term><command>switch-root
<replaceable>ROOT
</replaceable> <optional><replaceable>INIT
</replaceable></optional></command></term>
1649 <para>Switches to a different root directory and executes a
1650 new system manager process below it. This is intended for
1651 usage in initial RAM disks (
"initrd"), and will transition
1652 from the initrd's system manager process (a.k.a.
"init"
1653 process) to the main system manager process. This call takes two
1654 arguments: the directory that is to become the new root directory, and
1655 the path to the new system manager binary below it to
1656 execute as PID
1. If the latter is omitted or the empty
1657 string, a systemd binary will automatically be searched for
1658 and used as init. If the system manager path is omitted or
1659 equal to the empty string, the state of the initrd's system
1660 manager process is passed to the main system manager, which
1661 allows later introspection of the state of the services
1662 involved in the initrd boot.
</para>
1667 <term><command>suspend
</command></term>
1670 <para>Suspend the system. This will trigger activation of
1671 the special
<filename>suspend.target
</filename> target.
1677 <term><command>hibernate
</command></term>
1680 <para>Hibernate the system. This will trigger activation of
1681 the special
<filename>hibernate.target
</filename> target.
1687 <term><command>hybrid-sleep
</command></term>
1690 <para>Hibernate and suspend the system. This will trigger
1691 activation of the special
1692 <filename>hybrid-sleep.target
</filename> target.
</para>
1699 <title>Parameter Syntax
</title>
1701 <para>Unit commands listed above take either a single unit name (designated as
<replaceable>NAME
</replaceable>),
1702 or multiple unit specifications (designated as
<replaceable>PATTERN
</replaceable>...). In the first case, the
1703 unit name with or without a suffix must be given. If the suffix is not specified (unit name is
"abbreviated"),
1704 systemctl will append a suitable suffix,
<literal>.service
</literal> by default, and a type-specific suffix in
1705 case of commands which operate only on specific unit types. For example,
1706 <programlisting># systemctl start sshd
</programlisting> and
1707 <programlisting># systemctl start sshd.service
</programlisting>
1708 are equivalent, as are
1709 <programlisting># systemctl isolate default
</programlisting>
1711 <programlisting># systemctl isolate default.target
</programlisting>
1712 Note that (absolute) paths to device nodes are automatically converted to device unit names, and other (absolute)
1713 paths to mount unit names.
1714 <programlisting># systemctl status /dev/sda
1715 # systemctl status /home
</programlisting>
1717 <programlisting># systemctl status dev-sda.device
1718 # systemctl status home.mount
</programlisting>
1719 In the second case, shell-style globs will be matched against the primary names of all currently loaded units;
1720 literal unit names, with or without a suffix, will be treated as in the first case. This means that literal unit
1721 names always refer to exactly one unit, but globs may match zero units and this is not considered an
1724 <para>Glob patterns use
1725 <citerefentry project='man-pages'
><refentrytitle>fnmatch
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1726 so normal shell-style globbing rules are used, and
1727 <literal>*
</literal>,
<literal>?
</literal>,
1728 <literal>[]
</literal> may be used. See
1729 <citerefentry project='man-pages'
><refentrytitle>glob
</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1730 for more details. The patterns are matched against the primary names of
1731 currently loaded units, and patterns which do not match anything
1732 are silently skipped. For example:
1733 <programlisting># systemctl stop sshd@*.service
</programlisting>
1734 will stop all
<filename>sshd@.service
</filename> instances. Note that alias names of units, and units that aren't
1735 loaded are not considered for glob expansion.
1738 <para>For unit file commands, the specified
<replaceable>NAME
</replaceable> should be the name of the unit file
1739 (possibly abbreviated, see above), or the absolute path to the unit file:
1740 <programlisting># systemctl enable foo.service
</programlisting>
1742 <programlisting># systemctl link /path/to/foo.service
</programlisting>
1749 <title>Exit status
</title>
1751 <para>On success,
0 is returned, a non-zero failure
1752 code otherwise.
</para>
1756 <title>Environment
</title>
1758 <variablelist class='environment-variables'
>
1760 <term><varname>$SYSTEMD_EDITOR
</varname></term>
1762 <listitem><para>Editor to use when editing units; overrides
1763 <varname>$EDITOR
</varname> and
<varname>$VISUAL
</varname>. If neither
1764 <varname>$SYSTEMD_EDITOR
</varname> nor
<varname>$EDITOR
</varname> nor
1765 <varname>$VISUAL
</varname> are present or if it is set to an empty
1766 string or if their execution failed, systemctl will try to execute well
1767 known editors in this order:
1768 <citerefentry project='die-net'
><refentrytitle>editor
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1769 <citerefentry project='die-net'
><refentrytitle>nano
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1770 <citerefentry project='die-net'
><refentrytitle>vim
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1771 <citerefentry project='die-net'
><refentrytitle>vi
</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
1775 <xi:include href=
"less-variables.xml" xpointer=
"pager"/>
1776 <xi:include href=
"less-variables.xml" xpointer=
"less"/>
1780 <title>See Also
</title>
1782 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1783 <citerefentry><refentrytitle>journalctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1784 <citerefentry><refentrytitle>loginctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1785 <citerefentry><refentrytitle>machinectl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1786 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1787 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1788 <citerefentry><refentrytitle>systemd.special
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1789 <citerefentry project='man-pages'
><refentrytitle>wall
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1790 <citerefentry><refentrytitle>systemd.preset
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1791 <citerefentry><refentrytitle>systemd.generator
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1792 <citerefentry project='man-pages'
><refentrytitle>glob
</refentrytitle><manvolnum>7</manvolnum></citerefentry>