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 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>RequiredByOverridable=
</varname>,
183 <varname>PartOf=
</varname>,
<varname>BoundBy=
</varname>,
184 instead of
<varname>Wants=
</varname> and similar.
190 <term><option>--after
</option></term>
193 <para>With
<command>list-dependencies
</command>, show the
194 units that are ordered before the specified unit. In other
195 words, recursively list units following the
196 <varname>After=
</varname> dependency.
</para>
198 <para>Note that any
<varname>After=
</varname> dependency is
199 automatically mirrored to create a
200 <varname>Before=
</varname> dependency. Temporal dependencies
201 may be specified explicitly, but are also created implicitly
202 for units which are
<varname>WantedBy=
</varname> targets
204 <citerefentry><refentrytitle>systemd.target
</refentrytitle><manvolnum>5</manvolnum></citerefentry>),
205 and as a result of other directives (for example
206 <varname>RequiresMountsFor=
</varname>). Both explicitly
207 and implicitly introduced dependencies are shown with
208 <command>list-dependencies
</command>.
</para>
213 <term><option>--before
</option></term>
216 <para>With
<command>list-dependencies
</command>, show the
217 units that are ordered after the specified unit. In other
218 words, recursively list units following the
219 <varname>Before=
</varname> dependency.
</para>
224 <term><option>-l
</option></term>
225 <term><option>--full
</option></term>
228 <para>Do not ellipsize unit names, process tree entries,
229 journal output, or truncate unit descriptions in the output
230 of
<command>status
</command>,
<command>list-units
</command>,
231 <command>list-jobs
</command>, and
232 <command>list-timers
</command>.
</para>
237 <term><option>--show-types
</option></term>
240 <para>When showing sockets, show the type of the socket.
</para>
245 <term><option>--job-mode=
</option></term>
248 <para>When queuing a new job, this option controls how to deal with
249 already queued jobs. It takes one of
<literal>fail
</literal>,
250 <literal>replace
</literal>,
251 <literal>replace-irreversibly
</literal>,
252 <literal>isolate
</literal>,
253 <literal>ignore-dependencies
</literal>,
254 <literal>ignore-requirements
</literal> or
255 <literal>flush
</literal>. Defaults to
256 <literal>replace
</literal>, except when the
257 <command>isolate
</command> command is used which implies the
258 <literal>isolate
</literal> job mode.
</para>
260 <para>If
<literal>fail
</literal> is specified and a requested
261 operation conflicts with a pending job (more specifically:
262 causes an already pending start job to be reversed into a stop
263 job or vice versa), cause the operation to fail.
</para>
265 <para>If
<literal>replace
</literal> (the default) is
266 specified, any conflicting pending job will be replaced, as
269 <para>If
<literal>replace-irreversibly
</literal> is specified,
270 operate like
<literal>replace
</literal>, but also mark the new
271 jobs as irreversible. This prevents future conflicting
272 transactions from replacing these jobs (or even being enqueued
273 while the irreversible jobs are still pending). Irreversible
274 jobs can still be cancelled using the
<command>cancel
</command>
277 <para><literal>isolate
</literal> is only valid for start
278 operations and causes all other units to be stopped when the
279 specified unit is started. This mode is always used when the
280 <command>isolate
</command> command is used.
</para>
282 <para><literal>flush
</literal> will cause all queued jobs to
283 be canceled when the new job is enqueued.
</para>
285 <para>If
<literal>ignore-dependencies
</literal> is specified,
286 then all unit dependencies are ignored for this new job and
287 the operation is executed immediately. If passed, no required
288 units of the unit passed will be pulled in, and no ordering
289 dependencies will be honored. This is mostly a debugging and
290 rescue tool for the administrator and should not be used by
293 <para><literal>ignore-requirements
</literal> is similar to
294 <literal>ignore-dependencies
</literal>, but only causes the
295 requirement dependencies to be ignored, the ordering
296 dependencies will still be honoured.
</para>
302 <term><option>--fail
</option></term>
305 <para>Shorthand for
<option>--job-mode=
</option>fail.
</para>
306 <para>When used with the
<command>kill
</command> command,
307 if no units were killed, the operation results in an error.
313 <term><option>-i
</option></term>
314 <term><option>--ignore-inhibitors
</option></term>
317 <para>When system shutdown or a sleep state is requested,
318 ignore inhibitor locks. Applications can establish inhibitor
319 locks to avoid that certain important operations (such as CD
320 burning or suchlike) are interrupted by system shutdown or a
321 sleep state. Any user may take these locks and privileged
322 users may override these locks. If any locks are taken,
323 shutdown and sleep state requests will normally fail
324 (regardless of whether privileged or not) and a list of active locks
325 is printed. However, if
<option>--ignore-inhibitors
</option>
326 is specified, the locks are ignored and not printed, and the
327 operation attempted anyway, possibly requiring additional
333 <term><option>-q
</option></term>
334 <term><option>--quiet
</option></term>
337 <para>Suppress printing of the results of various commands
338 and also the hints about truncated log lines. This does not
339 suppress output of commands for which the printed output is
340 the only result (like
<command>show
</command>). Errors are
341 always printed.
</para>
346 <term><option>--no-block
</option></term>
349 <para>Do not synchronously wait for the requested operation
350 to finish. If this is not specified, the job will be
351 verified, enqueued and
<command>systemctl
</command> will
352 wait until the unit's start-up is completed. By passing this
353 argument, it is only verified and enqueued.
</para>
357 <xi:include href=
"user-system-options.xml" xpointer=
"user" />
358 <xi:include href=
"user-system-options.xml" xpointer=
"system" />
360 <!-- we do not document -failed here, as it has been made
361 redundant by -state=failed, which it predates. To keep
362 things simple we only document the new switch, while
363 keeping the old one around for compatibility only. -->
366 <term><option>--no-wall
</option></term>
369 <para>Do not send wall message before halt, power-off,
375 <term><option>--global
</option></term>
378 <para>When used with
<command>enable
</command> and
379 <command>disable
</command>, operate on the global user
380 configuration directory, thus enabling or disabling a unit
381 file globally for all future logins of all users.
</para>
386 <term><option>--no-reload
</option></term>
389 <para>When used with
<command>enable
</command> and
390 <command>disable
</command>, do not implicitly reload daemon
391 configuration after executing the changes.
</para>
396 <term><option>--no-ask-password
</option></term>
399 <para>When used with
<command>start
</command> and related
400 commands, disables asking for passwords. Background services
401 may require input of a password or passphrase string, for
402 example to unlock system hard disks or cryptographic
403 certificates. Unless this option is specified and the
404 command is invoked from a terminal,
405 <command>systemctl
</command> will query the user on the
406 terminal for the necessary secrets. Use this option to
407 switch this behavior off. In this case, the password must be
408 supplied by some other means (for example graphical password
409 agents) or the service might fail. This also disables
410 querying the user for authentication for privileged
416 <term><option>--kill-who=
</option></term>
419 <para>When used with
<command>kill
</command>, choose which
420 processes to send a signal to. Must be one of
421 <option>main
</option>,
<option>control
</option> or
422 <option>all
</option> to select whether to kill only the main
423 process, the control process or all processes of the
424 unit. The main process of the unit is the one that defines
425 the life-time of it. A control process of a unit is one that
426 is invoked by the manager to induce state changes of it. For
427 example, all processes started due to the
428 <varname>ExecStartPre=
</varname>,
429 <varname>ExecStop=
</varname> or
430 <varname>ExecReload=
</varname> settings of service units are
431 control processes. Note that there is only one control
432 process per unit at a time, as only one state change is
433 executed at a time. For services of type
434 <varname>Type=forking
</varname>, the initial process started
435 by the manager for
<varname>ExecStart=
</varname> is a
436 control process, while the process ultimately forked off by
437 that one is then considered the main process of the unit (if
438 it can be determined). This is different for service units
439 of other types, where the process forked off by the manager
440 for
<varname>ExecStart=
</varname> is always the main process
441 itself. A service unit consists of zero or one main process,
442 zero or one control process plus any number of additional
443 processes. Not all unit types manage processes of these
444 types however. For example, for mount units, control processes
445 are defined (which are the invocations of
446 <filename>&MOUNT_PATH;</filename> and
447 <filename>&UMOUNT_PATH;</filename>), but no main process
448 is defined. If omitted, defaults to
449 <option>all
</option>.
</para>
455 <term><option>-s
</option></term>
456 <term><option>--signal=
</option></term>
459 <para>When used with
<command>kill
</command>, choose which
460 signal to send to selected processes. Must be one of the
461 well known signal specifiers such as
<constant>SIGTERM
</constant>,
<constant>SIGINT
</constant> or
462 <constant>SIGSTOP
</constant>. If omitted, defaults to
463 <option>SIGTERM
</option>.
</para>
468 <term><option>-f
</option></term>
469 <term><option>--force
</option></term>
472 <para>When used with
<command>enable
</command>, overwrite
473 any existing conflicting symlinks.
</para>
475 <para>When used with
<command>halt
</command>,
476 <command>poweroff
</command>,
<command>reboot
</command> or
477 <command>kexec
</command>, execute the selected operation
478 without shutting down all units. However, all processes will
479 be killed forcibly and all file systems are unmounted or
480 remounted read-only. This is hence a drastic but relatively
481 safe option to request an immediate reboot. If
482 <option>--force
</option> is specified twice for these
483 operations, they will be executed immediately without
484 terminating any processes or unmounting any file
485 systems. Warning: specifying
<option>--force
</option> twice
486 with any of these operations might result in data
492 <term><option>--message=
</option></term>
495 <para>When used with
<command>halt
</command>,
496 <command>poweroff
</command>,
<command>reboot
</command> or
497 <command>kexec
</command>, set a short message explaining the reason
498 for the operation. The message will be logged together with the
499 default shutdown message.
</para>
504 <term><option>--now
</option></term>
507 <para>When used with
<command>enable
</command>, the units
508 will also be started. When used with
<command>disable
</command> or
509 <command>mask
</command>, the units will also be stopped. The start
510 or stop operation is only carried out when the respective enable or
511 disable operation has been successful.
</para>
516 <term><option>--root=
</option></term>
520 <command>enable
</command>/
<command>disable
</command>/
<command>is-enabled
</command>
521 (and related commands), use alternative root path when
522 looking for unit files.
</para>
528 <term><option>--runtime
</option></term>
531 <para>When used with
<command>enable
</command>,
532 <command>disable
</command>,
<command>edit
</command>,
533 (and related commands), make changes only temporarily, so
534 that they are lost on the next reboot. This will have the
535 effect that changes are not made in subdirectories of
536 <filename>/etc
</filename> but in
<filename>/run
</filename>,
537 with identical immediate effects, however, since the latter
538 is lost on reboot, the changes are lost too.
</para>
540 <para>Similarly, when used with
541 <command>set-property
</command>, make changes only
542 temporarily, so that they are lost on the next
548 <term><option>--preset-mode=
</option></term>
551 <para>Takes one of
<literal>full
</literal> (the default),
552 <literal>enable-only
</literal>,
553 <literal>disable-only
</literal>. When used with the
554 <command>preset
</command> or
<command>preset-all
</command>
555 commands, controls whether units shall be disabled and
556 enabled according to the preset rules, or only enabled, or
557 only disabled.
</para>
562 <term><option>-n
</option></term>
563 <term><option>--lines=
</option></term>
566 <para>When used with
<command>status
</command>, controls the
567 number of journal lines to show, counting from the most
568 recent ones. Takes a positive integer argument. Defaults to
574 <term><option>-o
</option></term>
575 <term><option>--output=
</option></term>
578 <para>When used with
<command>status
</command>, controls the
579 formatting of the journal entries that are shown. For the
580 available choices, see
581 <citerefentry><refentrytitle>journalctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
582 Defaults to
<literal>short
</literal>.
</para>
587 <term><option>--firmware-setup
</option></term>
590 <para>When used with the
<command>reboot
</command> command,
591 indicate to the system's firmware to boot into setup
592 mode. Note that this is currently only supported on some EFI
593 systems and only if the system was booted in EFI
599 <term><option>--plain
</option></term>
602 <para>When used with
<command>list-dependencies
</command>,
603 the output is printed as a list instead of a tree.
</para>
607 <xi:include href=
"user-system-options.xml" xpointer=
"host" />
608 <xi:include href=
"user-system-options.xml" xpointer=
"machine" />
610 <xi:include href=
"standard-options.xml" xpointer=
"no-pager" />
611 <xi:include href=
"standard-options.xml" xpointer=
"no-legend" />
612 <xi:include href=
"standard-options.xml" xpointer=
"help" />
613 <xi:include href=
"standard-options.xml" xpointer=
"version" />
618 <title>Commands
</title>
620 <para>The following commands are understood:
</para>
623 <title>Unit Commands
</title>
627 <term><command>list-units
<optional><replaceable>PATTERN
</replaceable>...
</optional></command></term>
630 <para>List known units (subject to limitations specified
631 with
<option>-t
</option>). If one or more
632 <replaceable>PATTERN
</replaceable>s are specified, only
633 units matching one of them are shown.
</para>
635 <para>This is the default command.
</para>
640 <term><command>list-sockets
<optional><replaceable>PATTERN
</replaceable>...
</optional></command></term>
643 <para>List socket units ordered by listening address.
644 If one or more
<replaceable>PATTERN
</replaceable>s are
645 specified, only socket units matching one of them are
646 shown. Produces output similar to
648 LISTEN UNIT ACTIVATES
649 /dev/initctl systemd-initctl.socket systemd-initctl.service
651 [::]:
22 sshd.socket sshd.service
652 kobject-uevent
1 systemd-udevd-kernel.socket systemd-udevd.service
654 5 sockets listed.
</programlisting>
655 Note: because the addresses might contains spaces, this output
656 is not suitable for programmatic consumption.
659 <para>See also the options
<option>--show-types
</option>,
660 <option>--all
</option>, and
<option>--state=
</option>.
</para>
665 <term><command>list-timers
<optional><replaceable>PATTERN
</replaceable>...
</optional></command></term>
668 <para>List timer units ordered by the time they elapse
669 next. If one or more
<replaceable>PATTERN
</replaceable>s
670 are specified, only units matching one of them are shown.
673 <para>See also the options
<option>--all
</option> and
674 <option>--state=
</option>.
</para>
679 <term><command>start
<replaceable>PATTERN
</replaceable>...
</command></term>
682 <para>Start (activate) one or more units specified on the
685 <para>Note that glob patterns operate on a list of currently
686 loaded units. Units which are not active and are not in a
687 failed state usually are not loaded, and would not be
688 matched by any pattern. In addition, in case of
689 instantiated units, systemd is often unaware of the
690 instance name until the instance has been started. Therefore,
691 using glob patterns with
<command>start
</command>
692 has limited usefulness.
</para>
696 <term><command>stop
<replaceable>PATTERN
</replaceable>...
</command></term>
699 <para>Stop (deactivate) one or more units specified on the
704 <term><command>reload
<replaceable>PATTERN
</replaceable>...
</command></term>
707 <para>Asks all units listed on the command line to reload
708 their configuration. Note that this will reload the
709 service-specific configuration, not the unit configuration
710 file of systemd. If you want systemd to reload the
711 configuration file of a unit, use the
712 <command>daemon-reload
</command> command. In other words:
713 for the example case of Apache, this will reload Apache's
714 <filename>httpd.conf
</filename> in the web server, not the
715 <filename>apache.service
</filename> systemd unit
718 <para>This command should not be confused with the
719 <command>daemon-reload
</command> command.
</para>
724 <term><command>restart
<replaceable>PATTERN
</replaceable>...
</command></term>
727 <para>Restart one or more units specified on the command
728 line. If the units are not running yet, they will be
733 <term><command>try-restart
<replaceable>PATTERN
</replaceable>...
</command></term>
736 <para>Restart one or more units specified on the command
737 line if the units are running. This does nothing if units are not
738 running. Note that, for compatibility with Red Hat init
739 scripts,
<command>condrestart
</command> is equivalent to this
744 <term><command>reload-or-restart
<replaceable>PATTERN
</replaceable>...
</command></term>
747 <para>Reload one or more units if they support it. If not,
748 restart them instead. If the units are not running yet, they
749 will be started.
</para>
753 <term><command>reload-or-try-restart
<replaceable>PATTERN
</replaceable>...
</command></term>
756 <para>Reload one or more units if they support it. If not,
757 restart them instead. This does nothing if the units are not
758 running. Note that, for compatibility with SysV init scripts,
759 <command>force-reload
</command> is equivalent to this
764 <term><command>isolate
<replaceable>NAME
</replaceable></command></term>
767 <para>Start the unit specified on the command line and its
768 dependencies and stop all others. If a unit name with no
769 extension is given, an extension of
770 <literal>.target
</literal> will be assumed.
</para>
772 <para>This is similar to changing the runlevel in a
773 traditional init system. The
<command>isolate
</command>
774 command will immediately stop processes that are not enabled
775 in the new unit, possibly including the graphical
776 environment or terminal you are currently using.
</para>
778 <para>Note that this is allowed only on units where
779 <option>AllowIsolate=
</option> is enabled. See
780 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
785 <term><command>kill
<replaceable>PATTERN
</replaceable>...
</command></term>
788 <para>Send a signal to one or more processes of the
789 unit. Use
<option>--kill-who=
</option> to select which
790 process to kill. Use
<option>--signal=
</option> to select
791 the signal to send.
</para>
795 <term><command>is-active
<replaceable>PATTERN
</replaceable>...
</command></term>
798 <para>Check whether any of the specified units are active
799 (i.e. running). Returns an exit code
800 <constant>0</constant> if at least one is active, or
801 non-zero otherwise. Unless
<option>--quiet
</option> is
802 specified, this will also print the current unit state to
803 standard output.
</para>
807 <term><command>is-failed
<replaceable>PATTERN
</replaceable>...
</command></term>
810 <para>Check whether any of the specified units are in a
811 "failed" state. Returns an exit code
812 <constant>0</constant> if at least one has failed,
813 non-zero otherwise. Unless
<option>--quiet
</option> is
814 specified, this will also print the current unit state to
815 standard output.
</para>
819 <term><command>status
</command> <optional><replaceable>PATTERN
</replaceable>...|
<replaceable>PID
</replaceable>...]
</optional></term>
822 <para>Show terse runtime status information about one or
823 more units, followed by most recent log data from the
824 journal. If no units are specified, show system status. If
825 combined with
<option>--all
</option>, also show the status of
826 all units (subject to limitations specified with
827 <option>-t
</option>). If a PID is passed, show information
828 about the unit the process belongs to.
</para>
830 <para>This function is intended to generate human-readable
831 output. If you are looking for computer-parsable output,
832 use
<command>show
</command> instead. By default this
833 function only shows
10 lines of output and ellipsizes
834 lines to fit in the terminal window. This can be changes
835 with
<option>--lines
</option> and
<option>--full
</option>,
836 see above. In addition,
<command>journalctl
837 --unit=
<replaceable>NAME
</replaceable></command> or
839 --user-unit=
<replaceable>NAME
</replaceable></command> use
840 a similar filter for messages and might be more
846 <term><command>show
</command> <optional><replaceable>PATTERN
</replaceable>...|
<replaceable>JOB
</replaceable>...
</optional></term>
849 <para>Show properties of one or more units, jobs, or the
850 manager itself. If no argument is specified, properties of
851 the manager will be shown. If a unit name is specified,
852 properties of the unit is shown, and if a job id is
853 specified, properties of the job is shown. By default, empty
854 properties are suppressed. Use
<option>--all
</option> to
855 show those too. To select specific properties to show, use
856 <option>--property=
</option>. This command is intended to be
857 used whenever computer-parsable output is required. Use
858 <command>status
</command> if you are looking for formatted
859 human-readable output.
</para>
863 <term><command>cat
<replaceable>PATTERN
</replaceable>...
</command></term>
866 <para>Show backing files of one or more units. Prints the
867 "fragment" and
"drop-ins" (source files) of units. Each
868 file is preceded by a comment which includes the file
873 <term><command>set-property
<replaceable>NAME
</replaceable> <replaceable>ASSIGNMENT
</replaceable>...
</command></term>
876 <para>Set the specified unit properties at runtime where
877 this is supported. This allows changing configuration
878 parameter properties such as resource control settings at
879 runtime. Not all properties may be changed at runtime, but
880 many resource control settings (primarily those in
881 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry>)
882 may. The changes are applied instantly, and stored on disk
883 for future boots, unless
<option>--runtime
</option> is
884 passed, in which case the settings only apply until the
885 next reboot. The syntax of the property assignment follows
886 closely the syntax of assignments in unit files.
</para>
888 <para>Example:
<command>systemctl set-property foobar.service CPUShares=
777</command></para>
890 <para>Note that this command allows changing multiple
891 properties at the same time, which is preferable over
892 setting them individually. Like unit file configuration
893 settings, assigning the empty list to list parameters will
894 reset the list.
</para>
899 <term><command>help
<replaceable>PATTERN
</replaceable>...|
<replaceable>PID
</replaceable>...
</command></term>
902 <para>Show manual pages for one or more units, if
903 available. If a PID is given, the manual pages for the unit
904 the process belongs to are shown.
</para>
909 <term><command>reset-failed [
<replaceable>PATTERN
</replaceable>...]
</command></term>
912 <para>Reset the
<literal>failed
</literal> state of the
913 specified units, or if no unit name is passed, reset the state of all
914 units. When a unit fails in some way (i.e. process exiting
915 with non-zero error code, terminating abnormally or timing
916 out), it will automatically enter the
917 <literal>failed
</literal> state and its exit code and status
918 is recorded for introspection by the administrator until the
919 service is restarted or reset with this command.
</para>
925 <command>list-dependencies
</command>
926 <optional><replaceable>NAME
</replaceable></optional>
930 <para>Shows units required and wanted by the specified
931 unit. This recursively lists units following the
932 <varname>Requires=
</varname>,
933 <varname>RequiresOverridable=
</varname>,
934 <varname>Requisite=
</varname>,
935 <varname>RequisiteOverridable=
</varname>,
936 <varname>ConsistsOf=
</varname>,
937 <varname>Wants=
</varname>,
<varname>BindsTo=
</varname>
938 dependencies. If no unit is specified,
939 <filename>default.target
</filename> is implied.
</para>
941 <para>By default, only target units are recursively
942 expanded. When
<option>--all
</option> is passed, all other
943 units are recursively expanded as well.
</para>
945 <para>Options
<option>--reverse
</option>,
946 <option>--after
</option>,
<option>--before
</option>
947 may be used to change what types of dependencies
955 <title>Unit File Commands
</title>
959 <term><command>list-unit-files
<optional><replaceable>PATTERN...
</replaceable></optional></command></term>
962 <para>List installed unit files. If one or more
963 <replaceable>PATTERN
</replaceable>s are specified, only
964 units whose filename (just the last component of the path)
965 matches one of them are shown.
</para>
970 <term><command>enable
<replaceable>NAME
</replaceable>...
</command></term>
973 <para>Enable one or more unit files or unit file instances,
974 as specified on the command line. This will create a number
975 of symlinks as encoded in the
<literal>[Install]
</literal>
976 sections of the unit files. After the symlinks have been
977 created, the systemd configuration is reloaded (in a way that
978 is equivalent to
<command>daemon-reload
</command>) to ensure
979 the changes are taken into account immediately. Note that
980 this does
<emphasis>not
</emphasis> have the effect of also
981 starting any of the units being enabled. If this
982 is desired, either
<option>--now
</option> should be used
983 together with this command, or an additional
<command>start
</command>
984 command must be invoked for the unit. Also note that in case of
985 instance enablement, symlinks named the same as instances
986 are created in the install location, however they all point to the
987 same template unit file.
</para>
989 <para>This command will print the actions executed. This
990 output may be suppressed by passing
<option>--quiet
</option>.
993 <para>Note that this operation creates only the suggested
994 symlinks for the units. While this command is the
995 recommended way to manipulate the unit configuration
996 directory, the administrator is free to make additional
997 changes manually by placing or removing symlinks in the
998 directory. This is particularly useful to create
999 configurations that deviate from the suggested default
1000 installation. In this case, the administrator must make sure
1001 to invoke
<command>daemon-reload
</command> manually as
1002 necessary to ensure the changes are taken into account.
1005 <para>Enabling units should not be confused with starting
1006 (activating) units, as done by the
<command>start
</command>
1007 command. Enabling and starting units is orthogonal: units
1008 may be enabled without being started and started without
1009 being enabled. Enabling simply hooks the unit into various
1010 suggested places (for example, so that the unit is
1011 automatically started on boot or when a particular kind of
1012 hardware is plugged in). Starting actually spawns the daemon
1013 process (in case of service units), or binds the socket (in
1014 case of socket units), and so on.
</para>
1016 <para>Depending on whether
<option>--system
</option>,
1017 <option>--user
</option>,
<option>--runtime
</option>,
1018 or
<option>--global
</option> is specified, this enables the unit
1019 for the system, for the calling user only, for only this boot of
1020 the system, or for all future logins of all users, or only this
1021 boot. Note that in the last case, no systemd daemon
1022 configuration is reloaded.
</para>
1024 <para>Using
<command>enable
</command> on masked units
1025 results in an error.
</para>
1030 <term><command>disable
<replaceable>NAME
</replaceable>...
</command></term>
1033 <para>Disables one or more units. This removes all symlinks
1034 to the specified unit files from the unit configuration
1035 directory, and hence undoes the changes made by
1036 <command>enable
</command>. Note however that this removes
1037 all symlinks to the unit files (i.e. including manual
1038 additions), not just those actually created by
1039 <command>enable
</command>. This call implicitly reloads the
1040 systemd daemon configuration after completing the disabling
1041 of the units. Note that this command does not implicitly
1042 stop the units that are being disabled. If this is desired, either
1043 <option>--now
</option> should be used together with this command, or
1044 an additional
<command>stop
</command> command should be executed
1047 <para>This command will print the actions executed. This
1048 output may be suppressed by passing
<option>--quiet
</option>.
1051 <para>This command honors
<option>--system
</option>,
1052 <option>--user
</option>,
<option>--runtime
</option> and
1053 <option>--global
</option> in a similar way as
1054 <command>enable
</command>.
</para>
1059 <term><command>reenable
<replaceable>NAME
</replaceable>...
</command></term>
1062 <para>Reenable one or more unit files, as specified on the
1063 command line. This is a combination of
1064 <command>disable
</command> and
<command>enable
</command> and
1065 is useful to reset the symlinks a unit is enabled with to
1066 the defaults configured in the
<literal>[Install]
</literal>
1067 section of the unit file.
</para>
1072 <term><command>preset
<replaceable>NAME
</replaceable>...
</command></term>
1075 <para>Reset one or more unit files, as specified on the
1076 command line, to the defaults configured in the preset
1077 policy files. This has the same effect as
1078 <command>disable
</command> or
<command>enable
</command>,
1079 depending how the unit is listed in the preset files.
</para>
1081 <para>Use
<option>--preset-mode=
</option> to control
1082 whether units shall be enabled and disabled, or only
1083 enabled, or only disabled.
</para>
1085 <para>For more information on the preset policy format,
1087 <citerefentry><refentrytitle>systemd.preset
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
1088 For more information on the concept of presets, please
1090 url=
"http://freedesktop.org/wiki/Software/systemd/Preset">Preset
</ulink>
1096 <term><command>preset-all
</command></term>
1099 <para>Resets all installed unit files to the defaults
1100 configured in the preset policy file (see above).
</para>
1102 <para>Use
<option>--preset-mode=
</option> to control
1103 whether units shall be enabled and disabled, or only
1104 enabled, or only disabled.
</para>
1109 <term><command>is-enabled
<replaceable>NAME
</replaceable>...
</command></term>
1112 <para>Checks whether any of the specified unit files are
1113 enabled (as with
<command>enable
</command>). Returns an
1114 exit code of
0 if at least one is enabled, non-zero
1115 otherwise. Prints the current enable status (see table).
1116 To suppress this output, use
<option>--quiet
</option>.
1121 <command>is-enabled
</command> output
1128 <entry>Description
</entry>
1129 <entry>Exit Code
</entry>
1134 <entry><literal>enabled
</literal></entry>
1135 <entry morerows='
1'
>Enabled through a symlink in
<filename>.wants
</filename> directory (permanently or just in
<filename>/run
</filename>).
</entry>
1136 <entry morerows='
1'
>0</entry>
1139 <entry><literal>enabled-runtime
</literal></entry>
1142 <entry><literal>linked
</literal></entry>
1143 <entry morerows='
1'
>Made available through a symlink to the unit file (permanently or just in
<filename>/run
</filename>).
</entry>
1144 <entry morerows='
1'
>> 0</entry>
1147 <entry><literal>linked-runtime
</literal></entry>
1150 <entry><literal>masked
</literal></entry>
1151 <entry morerows='
1'
>Disabled entirely (permanently or just in
<filename>/run
</filename>).
</entry>
1152 <entry morerows='
1'
>> 0</entry>
1155 <entry><literal>masked-runtime
</literal></entry>
1158 <entry><literal>static
</literal></entry>
1159 <entry>Unit file is not enabled, and has no provisions for enabling in the
<literal>[Install]
</literal> section.
</entry>
1163 <entry><literal>indirect
</literal></entry>
1164 <entry>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>
1168 <entry><literal>disabled
</literal></entry>
1169 <entry>Unit file is not enabled.
</entry>
1170 <entry>> 0</entry>
1180 <term><command>mask
<replaceable>NAME
</replaceable>...
</command></term>
1183 <para>Mask one or more unit files, as specified on the
1184 command line. This will link these units to
1185 <filename>/dev/null
</filename>, making it impossible to
1186 start them. This is a stronger version of
1187 <command>disable
</command>, since it prohibits all kinds of
1188 activation of the unit, including enablement and manual
1189 activation. Use this option with care. This honors the
1190 <option>--runtime
</option> option to only mask temporarily
1191 until the next reboot of the system. The
<option>--now
</option>
1192 option can be used to ensure that the units are also stopped.
</para>
1197 <term><command>unmask
<replaceable>NAME
</replaceable>...
</command></term>
1200 <para>Unmask one or more unit files, as specified on the
1201 command line. This will undo the effect of
1202 <command>mask
</command>.
</para>
1207 <term><command>link
<replaceable>FILENAME
</replaceable>...
</command></term>
1210 <para>Link a unit file that is not in the unit file search
1211 paths into the unit file search path. This requires an
1212 absolute path to a unit file. The effect of this can be
1213 undone with
<command>disable
</command>. The effect of this
1214 command is that a unit file is available for
1215 <command>start
</command> and other commands although it
1216 is not installed directly in the unit search path.
</para>
1221 <term><command>add-wants
<replaceable>TARGET
</replaceable>
1222 <replaceable>NAME
</replaceable>...
</command></term>
1223 <term><command>add-requires
<replaceable>TARGET
</replaceable>
1224 <replaceable>NAME
</replaceable>...
</command></term>
1227 <para>Adds
<literal>Wants=
</literal> or
<literal>Requires=
</literal>
1228 dependency, respectively, to the specified
1229 <replaceable>TARGET
</replaceable> for one or more units.
</para>
1231 <para>This command honors
<option>--system
</option>,
1232 <option>--user
</option>,
<option>--runtime
</option> and
1233 <option>--global
</option> in a similar way as
1234 <command>enable
</command>.
</para>
1240 <term><command>edit
<replaceable>NAME
</replaceable>...
</command></term>
1243 <para>Edit a drop-in snippet or a whole replacement file if
1244 <option>--full
</option> is specified, to extend or override the
1245 specified unit.
</para>
1247 <para>Depending on whether
<option>--system
</option> (the default),
1248 <option>--user
</option>, or
<option>--global
</option> is specified,
1249 this creates a drop-in file for each unit either for the system,
1250 for the calling user or for all futures logins of all users. Then,
1251 the editor (see the
"Environment" section below) is invoked on
1252 temporary files which will be written to the real location if the
1253 editor exits successfully.
</para>
1255 <para>If
<option>--full
</option> is specified, this will copy the
1256 original units instead of creating drop-in files.
</para>
1258 <para>If
<option>--runtime
</option> is specified, the changes will
1259 be made temporarily in
<filename>/run
</filename> and they will be
1260 lost on the next reboot.
</para>
1262 <para>If the temporary file is empty upon exit the modification of
1263 the related unit is canceled
</para>
1265 <para>After the units have been edited, systemd configuration is
1266 reloaded (in a way that is equivalent to
<command>daemon-reload
</command>).
1269 <para>Note that this command cannot be used to remotely edit units
1270 and that you cannot temporarily edit units which are in
1271 <filename>/etc
</filename> since they take precedence over
1272 <filename>/run
</filename>.
</para>
1277 <term><command>get-default
</command></term>
1280 <para>Return the default target to boot into. This returns
1281 the target unit name
<filename>default.target
</filename>
1282 is aliased (symlinked) to.
</para>
1287 <term><command>set-default
<replaceable>NAME
</replaceable></command></term>
1290 <para>Set the default target to boot into. This sets
1291 (symlinks) the
<filename>default.target
</filename> alias
1292 to the given target unit.
</para>
1300 <title>Machine Commands
</title>
1304 <term><command>list-machines
<optional><replaceable>PATTERN
</replaceable>...
</optional></command></term>
1307 <para>List the host and all running local containers with
1308 their state. If one or more
1309 <replaceable>PATTERN
</replaceable>s are specified, only
1310 containers matching one of them are shown.
1318 <title>Job Commands
</title>
1322 <term><command>list-jobs
<optional><replaceable>PATTERN...
</replaceable></optional></command></term>
1325 <para>List jobs that are in progress. If one or more
1326 <replaceable>PATTERN
</replaceable>s are specified, only
1327 jobs for units matching one of them are shown.
</para>
1331 <term><command>cancel
<replaceable>JOB
</replaceable>...
</command></term>
1334 <para>Cancel one or more jobs specified on the command line
1335 by their numeric job IDs. If no job ID is specified, cancel
1336 all pending jobs.
</para>
1343 <title>Snapshot Commands
</title>
1347 <term><command>snapshot
<optional><replaceable>NAME
</replaceable></optional></command></term>
1350 <para>Create a snapshot. If a snapshot name is specified,
1351 the new snapshot will be named after it. If none is
1352 specified, an automatic snapshot name is generated. In
1353 either case, the snapshot name used is printed to standard
1354 output, unless
<option>--quiet
</option> is specified.
1357 <para>A snapshot refers to a saved state of the systemd
1358 manager. It is implemented itself as a unit that is
1359 generated dynamically with this command and has dependencies
1360 on all units active at the time. At a later time, the user
1361 may return to this state by using the
1362 <command>isolate
</command> command on the snapshot unit.
1365 <para>Snapshots are only useful for saving and restoring
1366 which units are running or are stopped, they do not
1367 save/restore any other state. Snapshots are dynamic and lost
1372 <term><command>delete
<replaceable>PATTERN
</replaceable>...
</command></term>
1375 <para>Remove a snapshot previously created with
1376 <command>snapshot
</command>.
</para>
1383 <title>Environment Commands
</title>
1387 <term><command>show-environment
</command></term>
1390 <para>Dump the systemd manager environment block. The
1391 environment block will be dumped in straight-forward form
1392 suitable for sourcing into a shell script. This environment
1393 block will be passed to all processes the manager
1398 <term><command>set-environment
<replaceable>VARIABLE=VALUE
</replaceable>...
</command></term>
1401 <para>Set one or more systemd manager environment variables,
1402 as specified on the command line.
</para>
1406 <term><command>unset-environment
<replaceable>VARIABLE
</replaceable>...
</command></term>
1409 <para>Unset one or more systemd manager environment
1410 variables. If only a variable name is specified, it will be
1411 removed regardless of its value. If a variable and a value
1412 are specified, the variable is only removed if it has the
1413 specified value.
</para>
1418 <command>import-environment
</command>
1419 <optional><replaceable>VARIABLE...
</replaceable></optional>
1423 <para>Import all, one or more environment variables set on
1424 the client into the systemd manager environment block. If
1425 no arguments are passed, the entire environment block is
1426 imported. Otherwise, a list of one or more environment
1427 variable names should be passed, whose client-side values
1428 are then imported into the manager's environment
1436 <title>Manager Lifecycle Commands
</title>
1440 <term><command>daemon-reload
</command></term>
1443 <para>Reload systemd manager configuration. This will
1444 rerun all generators (see
1445 <citerefentry><refentrytitle>systemd.generator
</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
1446 reload all unit files, and recreate the entire dependency
1447 tree. While the daemon is being reloaded, all sockets
1448 systemd listens on behalf of user configuration will stay
1451 <para>This command should not be confused with the
1452 <command>reload
</command> command.
</para>
1456 <term><command>daemon-reexec
</command></term>
1459 <para>Reexecute the systemd manager. This will serialize the
1460 manager state, reexecute the process and deserialize the
1461 state again. This command is of little use except for
1462 debugging and package upgrades. Sometimes, it might be
1463 helpful as a heavy-weight
<command>daemon-reload
</command>.
1464 While the daemon is being reexecuted, all sockets systemd listening
1465 on behalf of user configuration will stay accessible.
1473 <title>System Commands
</title>
1477 <term><command>is-system-running
</command></term>
1480 <para>Checks whether the system is operational. This
1481 returns success (exit code
0) when the system is fully up
1482 and running, specifically not in startup, shutdown or
1483 maintenance mode, and with no failed services. Failure is
1484 returned otherwise (exit code non-zero). In addition, the
1485 current state is printed in a short string to standard
1486 output, see table below. Use
<option>--quiet
</option> to
1487 suppress this output.
</para>
1490 <title><command>is-system-running
</command> output
</title>
1492 <colspec colname='name'
/>
1493 <colspec colname='description'
/>
1494 <colspec colname='exit-code'
/>
1498 <entry>Description
</entry>
1499 <entry>Exit Code
</entry>
1504 <entry><varname>initializing
</varname></entry>
1505 <entry><para>Early bootup, before
1506 <filename>basic.target
</filename> is reached
1507 or the
<varname>maintenance
</varname> state entered.
1509 <entry>> 0</entry>
1512 <entry><varname>starting
</varname></entry>
1513 <entry><para>Late bootup, before the job queue
1514 becomes idle for the first time, or one of the
1515 rescue targets are reached.
</para></entry>
1516 <entry>> 0</entry>
1519 <entry><varname>running
</varname></entry>
1520 <entry><para>The system is fully
1521 operational.
</para></entry>
1525 <entry><varname>degraded
</varname></entry>
1526 <entry><para>The system is operational but one or more
1527 units failed.
</para></entry>
1528 <entry>> 0</entry>
1531 <entry><varname>maintenance
</varname></entry>
1532 <entry><para>The rescue or emergency target is
1533 active.
</para></entry>
1534 <entry>> 0</entry>
1537 <entry><varname>stopping
</varname></entry>
1538 <entry><para>The manager is shutting
1539 down.
</para></entry>
1540 <entry>> 0</entry>
1543 <entry><varname>offline
</varname></entry>
1544 <entry><para>The manager is not
1545 running. Specifically, this is the operational
1546 state if an incompatible program is running as
1547 system manager (PID
1).
</para></entry>
1548 <entry>> 0</entry>
1551 <entry><varname>unknown
</varname></entry>
1552 <entry><para>The operational state could not be
1553 determined, due to lack of resources or another
1554 error cause.
</para></entry>
1555 <entry>> 0</entry>
1564 <term><command>default
</command></term>
1567 <para>Enter default mode. This is mostly equivalent to
1568 <command>isolate default.target
</command>.
</para>
1573 <term><command>rescue
</command></term>
1576 <para>Enter rescue mode. This is mostly equivalent to
1577 <command>isolate rescue.target
</command>, but also prints a
1578 wall message to all users.
</para>
1582 <term><command>emergency
</command></term>
1585 <para>Enter emergency mode. This is mostly equivalent to
1586 <command>isolate emergency.target
</command>, but also prints
1587 a wall message to all users.
</para>
1591 <term><command>halt
</command></term>
1594 <para>Shut down and halt the system. This is mostly equivalent to
1595 <command>start halt.target --job-mode=replace-irreversibly
</command>, but also
1596 prints a wall message to all users. If combined with
1597 <option>--force
</option>, shutdown of all running services is
1598 skipped, however all processes are killed and all file
1599 systems are unmounted or mounted read-only, immediately
1600 followed by the system halt. If
<option>--force
</option> is
1601 specified twice, the operation is immediately executed
1602 without terminating any processes or unmounting any file
1603 systems. This may result in data loss.
</para>
1607 <term><command>poweroff
</command></term>
1610 <para>Shut down and power-off the system. This is mostly
1611 equivalent to
<command>start poweroff.target --job-mode=replace-irreversibly
</command>,
1612 but also prints a wall message to all users. If combined with
1613 <option>--force
</option>, shutdown of all running services is
1614 skipped, however all processes are killed and all file
1615 systems are unmounted or mounted read-only, immediately
1616 followed by the powering off. If
<option>--force
</option> is
1617 specified twice, the operation is immediately executed
1618 without terminating any processes or unmounting any file
1619 systems. This may result in data loss.
</para>
1623 <term><command>reboot
<optional><replaceable>arg
</replaceable></optional></command></term>
1626 <para>Shut down and reboot the system. This is mostly
1627 equivalent to
<command>start reboot.target --job-mode=replace-irreversibly
</command>,
1628 but also prints a wall message to all users. If combined with
1629 <option>--force
</option>, shutdown of all running services is
1630 skipped, however all processes are killed and all file
1631 systems are unmounted or mounted read-only, immediately
1632 followed by the reboot. If
<option>--force
</option> is
1633 specified twice, the operation is immediately executed
1634 without terminating any processes or unmounting any file
1635 systems. This may result in data loss.
</para>
1637 <para>If the optional argument
1638 <replaceable>arg
</replaceable> is given, it will be passed
1639 as the optional argument to the
1640 <citerefentry><refentrytitle>reboot
</refentrytitle><manvolnum>2</manvolnum></citerefentry>
1641 system call. The value is architecture and firmware
1642 specific. As an example,
<literal>recovery
</literal> might
1643 be used to trigger system recovery, and
1644 <literal>fota
</literal> might be used to trigger a
1645 <quote>firmware over the air
</quote> update.
</para>
1650 <term><command>kexec
</command></term>
1653 <para>Shut down and reboot the system via kexec. This is
1654 mostly equivalent to
<command>start kexec.target --job-mode=replace-irreversibly
</command>,
1655 but also prints a wall message to all users. If combined
1656 with
<option>--force
</option>, shutdown of all running
1657 services is skipped, however all processes are killed and
1658 all file systems are unmounted or mounted read-only,
1659 immediately followed by the reboot.
</para>
1664 <term><command>exit
<optional><replaceable>EXIT_CODE
</replaceable></optional></command></term>
1667 <para>Ask the systemd manager to quit. This is only
1668 supported for user service managers (i.e. in conjunction
1669 with the
<option>--user
</option> option) or in containers
1670 and is equivalent to
<command>poweroff
</command> otherwise.
</para>
1672 <para>The systemd manager can exit with a non-zero exit
1673 code if the optional argument
1674 <replaceable>EXIT_CODE
</replaceable> is given.
</para>
1679 <term><command>switch-root
<replaceable>ROOT
</replaceable> <optional><replaceable>INIT
</replaceable></optional></command></term>
1682 <para>Switches to a different root directory and executes a
1683 new system manager process below it. This is intended for
1684 usage in initial RAM disks (
"initrd"), and will transition
1685 from the initrd's system manager process (a.k.a
"init"
1686 process) to the main system manager process. This call takes two
1687 arguments: the directory that is to become the new root directory, and
1688 the path to the new system manager binary below it to
1689 execute as PID
1. If the latter is omitted or the empty
1690 string, a systemd binary will automatically be searched for
1691 and used as init. If the system manager path is omitted or
1692 equal to the empty string, the state of the initrd's system
1693 manager process is passed to the main system manager, which
1694 allows later introspection of the state of the services
1695 involved in the initrd boot.
</para>
1700 <term><command>suspend
</command></term>
1703 <para>Suspend the system. This will trigger activation of
1704 the special
<filename>suspend.target
</filename> target.
1710 <term><command>hibernate
</command></term>
1713 <para>Hibernate the system. This will trigger activation of
1714 the special
<filename>hibernate.target
</filename> target.
1720 <term><command>hybrid-sleep
</command></term>
1723 <para>Hibernate and suspend the system. This will trigger
1724 activation of the special
1725 <filename>hybrid-sleep.target
</filename> target.
</para>
1732 <title>Parameter Syntax
</title>
1734 <para>Unit commands listed above take either a single unit name
1735 (designated as
<replaceable>NAME
</replaceable>), or multiple
1736 unit specifications (designated as
1737 <replaceable>PATTERN
</replaceable>...). In the first case, the
1738 unit name with or without a suffix must be given. If the suffix
1739 is not specified, systemctl will append a suitable suffix,
1740 <literal>.service
</literal> by default, and a type-specific
1741 suffix in case of commands which operate only on specific unit
1743 <programlisting># systemctl start sshd
</programlisting> and
1744 <programlisting># systemctl start sshd.service
</programlisting>
1745 are equivalent, as are
1746 <programlisting># systemctl isolate default
</programlisting>
1748 <programlisting># systemctl isolate default.target
</programlisting>
1749 Note that (absolute) paths to device nodes are automatically
1750 converted to device unit names, and other (absolute) paths to
1752 <programlisting># systemctl status /dev/sda
1753 # systemctl status /home
</programlisting>
1755 <programlisting># systemctl status dev-sda.device
1756 # systemctl status home.mount
</programlisting>
1757 In the second case, shell-style globs will be matched against
1758 currently loaded units; literal unit names, with or without
1759 a suffix, will be treated as in the first case. This means that
1760 literal unit names always refer to exactly one unit, but globs
1761 may match zero units and this is not considered an error.
</para>
1763 <para>Glob patterns use
1764 <citerefentry project='man-pages'
><refentrytitle>fnmatch
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
1765 so normal shell-style globbing rules are used, and
1766 <literal>*
</literal>,
<literal>?
</literal>,
1767 <literal>[]
</literal> may be used. See
1768 <citerefentry project='man-pages'
><refentrytitle>glob
</refentrytitle><manvolnum>7</manvolnum></citerefentry>
1769 for more details. The patterns are matched against the names of
1770 currently loaded units, and patterns which do not match anything
1771 are silently skipped. For example:
1772 <programlisting># systemctl stop sshd@*.service
</programlisting>
1773 will stop all
<filename>sshd@.service
</filename> instances.
1776 <para>For unit file commands, the specified
1777 <replaceable>NAME
</replaceable> should be the full name of the
1778 unit file, or the absolute path to the unit file:
1779 <programlisting># systemctl enable foo.service
</programlisting>
1781 <programlisting># systemctl link /path/to/foo.service
</programlisting>
1788 <title>Exit status
</title>
1790 <para>On success,
0 is returned, a non-zero failure
1791 code otherwise.
</para>
1795 <title>Environment
</title>
1797 <variablelist class='environment-variables'
>
1799 <term><varname>$SYSTEMD_EDITOR
</varname></term>
1801 <listitem><para>Editor to use when editing units; overrides
1802 <varname>$EDITOR
</varname> and
<varname>$VISUAL
</varname>. If neither
1803 <varname>$SYSTEMD_EDITOR
</varname> nor
<varname>$EDITOR
</varname> nor
1804 <varname>$VISUAL
</varname> are present or if it is set to an empty
1805 string or if their execution failed, systemctl will try to execute well
1806 known editors in this order:
1807 <citerefentry project='die-net'
><refentrytitle>editor
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1808 <citerefentry project='die-net'
><refentrytitle>nano
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1809 <citerefentry project='die-net'
><refentrytitle>vim
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1810 <citerefentry project='die-net'
><refentrytitle>vi
</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
1814 <xi:include href=
"less-variables.xml" xpointer=
"pager"/>
1815 <xi:include href=
"less-variables.xml" xpointer=
"less"/>
1819 <title>See Also
</title>
1821 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1822 <citerefentry><refentrytitle>journalctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1823 <citerefentry><refentrytitle>loginctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1824 <citerefentry><refentrytitle>machinectl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1825 <citerefentry><refentrytitle>systemd.unit
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1826 <citerefentry><refentrytitle>systemd.resource-control
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1827 <citerefentry><refentrytitle>systemd.special
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1828 <citerefentry project='man-pages'
><refentrytitle>wall
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1829 <citerefentry><refentrytitle>systemd.preset
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1830 <citerefentry><refentrytitle>systemd.generator
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1831 <citerefentry project='man-pages'
><refentrytitle>glob
</refentrytitle><manvolnum>7</manvolnum></citerefentry>