1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 This file is part of systemd.
8 Copyright 2010 Lennart Poettering
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id="systemctl">
27 <title>systemctl</title>
28 <productname>systemd</productname>
32 <contrib>Developer</contrib>
33 <firstname>Lennart</firstname>
34 <surname>Poettering</surname>
35 <email>lennart@poettering.net</email>
41 <refentrytitle>systemctl</refentrytitle>
42 <manvolnum>1</manvolnum>
46 <refname>systemctl</refname>
47 <refpurpose>Control the systemd system and service manager</refpurpose>
52 <command>systemctl <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="req">COMMAND</arg> <arg choice="opt" rep="repeat">NAME</arg></command>
57 <title>Description</title>
59 <para><command>systemctl</command> may be used to
60 introspect and control the state of the
61 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
62 system and service manager.</para>
66 <title>Options</title>
68 <para>The following options are understood:</para>
72 <term><option>--help</option></term>
73 <term><option>-h</option></term>
75 <listitem><para>Prints a short help
76 text and exits.</para></listitem>
80 <term><option>--version</option></term>
82 <listitem><para>Prints a short version
83 string and exits.</para></listitem>
87 <term><option>--type=</option></term>
88 <term><option>-t</option></term>
90 <listitem><para>The argument should
91 be a unit type name such as
92 <option>service</option> and
93 <option>socket</option>,
94 or a unit load state such as
95 <option>loaded</option> and
96 <option>masked</option>.
99 <para>If the argument is a unit type,
100 when listing units, limit display to
101 certain unit types. If not specified
102 units of all types will be shown.</para>
104 <para>If the argument is a unit load state,
105 when listing units, limit display to
106 certain unit types. If not specified
107 units of in all load states will be
113 <term><option>--property=</option></term>
114 <term><option>-p</option></term>
116 <listitem><para>When showing
117 unit/job/manager properties, limit
118 display to certain properties as
119 specified as argument. If not
120 specified all set properties are
121 shown. The argument should be a
122 property name, such as
123 <literal>MainPID</literal>. If
124 specified more than once all
125 properties with the specified names
126 are shown.</para></listitem>
130 <term><option>--all</option></term>
131 <term><option>-a</option></term>
133 <listitem><para>When listing units,
134 show all units, regardless of their
135 state, including inactive units. When
136 showing unit/job/manager properties,
137 show all properties regardless whether
138 they are set or not.</para></listitem>
142 <term><option>--failed</option></term>
144 <listitem><para>When listing units,
145 show only failed units. Do not confuse
147 <option>--fail</option>.</para></listitem>
151 <term><option>--full</option></term>
153 <listitem><para>Do not ellipsize unit
154 names and truncate unit descriptions
156 <command>list-units</command> and
157 <command>list-jobs</command>.</para></listitem>
161 <term><option>--fail</option></term>
163 <listitem><para>If the requested
164 operation conflicts with a pending
165 unfinished job, fail the command. If
166 this is not specified the requested
167 operation will replace the pending job,
168 if necessary. Do not confuse
170 <option>--failed</option>.</para></listitem>
174 <term><option>--ignore-dependencies</option></term>
176 <listitem><para>When enqueuing a new
177 job ignore all its dependencies and
178 execute it immediately. If passed no
179 required units of the unit passed will
180 be pulled in, and no ordering
181 dependencies will be honoured. This is
182 mostly a debugging and rescue tool for
183 the administrator and should not be
185 applications.</para></listitem>
189 <term><option>--quiet</option></term>
190 <term><option>-q</option></term>
192 <listitem><para>Suppress output to
194 <command>snapshot</command>,
195 <command>is-active</command>,
196 <command>enable</command> and
197 <command>disable</command>.</para></listitem>
201 <term><option>--no-block</option></term>
203 <listitem><para>Do not synchronously wait for
204 the requested operation to finish. If this is
205 not specified the job will be verified,
206 enqueued and <command>systemctl</command> will
207 wait until it is completed. By passing this
208 argument it is only verified and
209 enqueued.</para></listitem>
213 <term><option>--no-legend</option></term>
215 <listitem><para>Do not print a legend, i.e.
216 the column headers and the footer with hints.
221 <term><option>--no-pager</option></term>
223 <listitem><para>Do not pipe output into a
224 pager.</para></listitem>
228 <term><option>--system</option></term>
230 <listitem><para>Talk to the systemd
231 system manager. (Default)</para></listitem>
235 <term><option>--user</option></term>
237 <listitem><para>Talk to the systemd
238 manager of the calling user.</para></listitem>
242 <term><option>--order</option></term>
243 <term><option>--require</option></term>
245 <listitem><para>When used in
247 <command>dot</command> command (see
248 below), selects which dependencies are
249 shown in the dependency graph. If
250 <option>--order</option> is passed
251 only dependencies of type
252 <varname>After=</varname> or
253 <varname>Before=</varname> are
254 shown. If <option>--require</option>
255 is passed only dependencies of type
256 <varname>Requires=</varname>,
257 <varname>RequiresOverridable=</varname>,
258 <varname>Requisite=</varname>,
259 <varname>RequisiteOverridable=</varname>,
260 <varname>Wants=</varname> and
261 <varname>Conflicts=</varname> are
262 shown. If neither is passed, shows
263 dependencies of all these
264 types.</para></listitem>
268 <term><option>--no-wall</option></term>
270 <listitem><para>Don't send wall
272 halt, power-off, reboot.</para></listitem>
276 <term><option>--global</option></term>
278 <listitem><para>When used with
279 <command>enable</command> and
280 <command>disable</command>, operate on the
281 global user configuration
282 directory, thus enabling or disabling
283 a unit file globally for all future
284 logins of all users.</para></listitem>
288 <term><option>--no-reload</option></term>
290 <listitem><para>When used with
291 <command>enable</command> and
292 <command>disable</command>, do not
293 implicitly reload daemon configuration
295 changes.</para></listitem>
299 <term><option>--no-ask-password</option></term>
301 <listitem><para>When used with
302 <command>start</command> and related
303 commands, disables asking for
304 passwords. Background services may
305 require input of a password or
306 passphrase string, for example to
307 unlock system hard disks or
308 cryptographic certificates. Unless
309 this option is specified and the
310 command is invoked from a terminal
311 <command>systemctl</command> will
312 query the user on the terminal for the
313 necessary secrets. Use this option to
314 switch this behavior off. In this case
315 the password must be supplied by some
316 other means (for example graphical
317 password agents) or the service might
318 fail. This also disables querying the
319 user for authentication for privileged
320 operations.</para></listitem>
324 <term><option>--kill-who=</option></term>
326 <listitem><para>When used with
327 <command>kill</command>, choose which
328 processes to kill. Must be one of
329 <option>main</option>,
330 <option>control</option> or
331 <option>all</option> to select whether
332 to kill only the main process of the
333 unit, the control process or all
334 processes of the unit. If omitted
336 <option>all</option>.</para></listitem>
340 <term><option>--signal=</option></term>
341 <term><option>-s</option></term>
343 <listitem><para>When used with
344 <command>kill</command>, choose which
345 signal to send to selected
346 processes. Must be one of the well
347 known signal specifiers such as
348 SIGTERM, SIGINT or SIGSTOP. If
350 <option>SIGTERM</option>.</para></listitem>
354 <term><option>--force</option></term>
355 <term><option>-f</option></term>
357 <listitem><para>When used with
358 <command>enable</command>, overwrite any
360 symlinks.</para></listitem>
362 <listitem><para>When used with
363 <command>halt</command>,
364 <command>poweroff</command>,
365 <command>reboot</command> or
366 <command>kexec</command> execute the
367 selected operation without shutting
368 down all units. However, all processes
369 will be killed forcibly and all file
370 systems are unmounted or remounted
371 read-only. This is hence a drastic but
372 relatively safe option to request an
374 <option>--force</option> is specified
375 twice for these operations, they will
376 be executed immediately without
377 terminating any processes or umounting
378 any file systems. Warning: specifying
379 <option>--force</option> twice with
380 any of these operations might result
381 in data loss.</para></listitem>
385 <term><option>--root=</option></term>
387 <listitem><para>When used with
388 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and
389 related commands), use alternative
390 root path when looking for unit
391 files.</para></listitem>
395 <term><option>--runtime</option></term>
397 <listitem><para>When used with
398 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and related commands), make
399 changes only temporarily, so that they
400 are dropped on the next reboot. This
401 will have the effect that changes are
402 not made in subdirectories of
403 <filename>/etc</filename> but in
404 <filename>/run</filename>, with
405 identical immediate effects, however,
406 since the latter is lost on reboot,
408 too.</para></listitem>
412 <term><option>-H</option></term>
413 <term><option>--host</option></term>
415 <listitem><para>Execute operation
416 remotely. Specify a hostname, or
417 username and hostname separated by @,
418 to connect to. This will use SSH to
419 talk to the remote systemd
420 instance.</para></listitem>
424 <term><option>-P</option></term>
425 <term><option>--privileged</option></term>
427 <listitem><para>Acquire privileges via
428 PolicyKit before executing the
429 operation.</para></listitem>
433 <term><option>--lines=</option></term>
434 <term><option>-n</option></term>
436 <listitem><para>When used with
437 <command>status</command> controls the
438 number of journal lines to show,
439 counting from the most recent
440 ones. Takes a positive integer
441 argument. Defaults to
442 10.</para></listitem>
446 <term><option>--follow</option></term>
447 <term><option>-f</option></term>
449 <listitem><para>When used with
450 <command>status</command> continuously
451 prints new journal entries as they are
453 journal.</para></listitem>
457 <term><option>--output=</option></term>
458 <term><option>-o</option></term>
460 <listitem><para>When used with
461 <command>status</command> controls the
462 formatting of the journal entries that
463 are shown. For the available choices
465 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. Defaults
467 <literal>short</literal>.</para></listitem>
472 <para>The following commands are understood:</para>
476 <term><command>list-units</command></term>
478 <listitem><para>List known units.</para></listitem>
481 <term><command>start [NAME...]</command></term>
483 <listitem><para>Start (activate) one
484 or more units specified on the command
485 line.</para></listitem>
488 <term><command>stop [NAME...]</command></term>
490 <listitem><para>Stop (deactivate) one
491 or more units specified on the command
492 line.</para></listitem>
495 <term><command>reload [NAME...]</command></term>
497 <listitem><para>Asks all units listed
498 on the command line to reload their
499 configuration. Note that this will
500 reload the service-specific
501 configuration, not the unit
502 configuration file of systemd. If you
503 want systemd to reload the
504 configuration file of a unit use the
505 <command>daemon-reload</command>
506 command. In other words: for the
507 example case of Apache, this will
509 <filename>httpd.conf</filename> in the
511 <filename>apache.service</filename>
512 systemd unit file. </para>
514 <para>This command should not be
516 <command>daemon-reload</command> or
517 <command>load</command>
518 commands.</para></listitem>
522 <term><command>restart [NAME...]</command></term>
524 <listitem><para>Restart one or more
525 units specified on the command
526 line. If the units are not running yet
528 started.</para></listitem>
531 <term><command>try-restart [NAME...]</command></term>
533 <listitem><para>Restart one or more
534 units specified on the command
535 line if the units are running. Do
536 nothing if units are not running.
537 Note that for compatibility
538 with Red Hat init scripts
539 <command>condrestart</command> is
540 equivalent to this command.</para></listitem>
543 <term><command>reload-or-restart [NAME...]</command></term>
545 <listitem><para>Reload one or more
546 units if they support it. If not,
547 restart them instead. If the units
548 are not running yet they will be
549 started.</para></listitem>
552 <term><command>reload-or-try-restart [NAME...]</command></term>
554 <listitem><para>Reload one or more
555 units if they support it. If not,
556 restart them instead. Do nothing if
557 the units are not running. Note that
558 for compatibility with SysV init
560 <command>force-reload</command> is
562 command.</para></listitem>
565 <term><command>isolate [NAME]</command></term>
567 <listitem><para>Start the unit
568 specified on the command line and its
569 dependencies and stop all others.</para>
571 <para>This is similar to changing the
572 runlevel in a traditional init system. The
573 <command>isolate</command> command will
574 immediately stop processes that are not
575 enabled in the new unit, possibly including
576 the graphical environment or terminal you
577 are currently using.</para>
579 <para>Note that this works only on units
580 where <option>AllowIsolate=</option> is
582 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
583 for details.</para></listitem>
586 <term><command>kill [NAME...]</command></term>
588 <listitem><para>Send a signal to one
589 or more processes of the unit. Use
590 <option>--kill-who=</option> to select
591 which process to kill. Use
592 <option>--kill-mode=</option> to
593 select the kill mode and
594 <option>--signal=</option> to select
595 the signal to send.</para></listitem>
598 <term><command>is-active [NAME...]</command></term>
600 <listitem><para>Check whether any of
601 the specified units are active
602 (i.e. running). Returns an exit code
603 0 if at least one is active, non-zero
605 <option>--quiet</option> is specified
606 this will also print the current unit
607 state to STDOUT.</para></listitem>
610 <term><command>status [NAME...|PID...]</command></term>
612 <listitem><para>Show terse runtime
613 status information about one or more
614 units, followed by its most recent log
615 data from the journal. This function
616 is intended to generate human-readable
617 output. If you are looking for
618 computer-parsable output, use
619 <command>show</command> instead. If a
620 PID is passed information about the
621 unit the process of the PID belongs to
622 is shown.</para></listitem>
625 <term><command>show [NAME...|JOB...]</command></term>
627 <listitem><para>Show properties of one
628 or more units, jobs or the manager
629 itself. If no argument is specified
630 properties of the manager will be
631 shown. If a unit name is specified
632 properties of the unit is shown, and
633 if a job id is specified properties of
634 the job is shown. By default, empty
635 properties are suppressed. Use
636 <option>--all</option> to show those
637 too. To select specific properties to
639 <option>--property=</option>. This
640 command is intended to be used
641 whenever computer-parsable output is
643 <command>status</command> if you are
644 looking for formatted human-readable
645 output.</para></listitem>
648 <term><command>help [NAME...|PID...]</command></term>
650 <listitem><para>Show manual pages for
651 one or more units, if available. If a
652 PID is passed the manual pages for the
653 unit the process of the PID belongs to
654 is shown.</para></listitem>
657 <term><command>reset-failed [NAME...]</command></term>
659 <listitem><para>Reset the
660 '<literal>failed</literal>' state of the
661 specified units, or if no unit name is
662 passed of all units. When a unit fails
663 in some way (i.e. process exiting with
664 non-zero error code, terminating
665 abnormally or timing out) it will
666 automatically enter the
667 '<literal>failed</literal>' state and
668 its exit code and status is recorded
669 for introspection by the administrator
670 until the service is restarted or
672 command.</para></listitem>
676 <term><command>list-unit-files</command></term>
678 <listitem><para>List installed unit files.
683 <term><command>enable [NAME...]</command></term>
685 <listitem><para>Enable one or
686 more unit files or unit file
687 instances, as specified on the
688 command line. This will create a
689 number of symlinks as encoded in
690 the <literal>[Install]</literal>
691 sections of the unit files. After
692 the symlinks have been created the
693 systemd configuration is reloaded
694 (in a way that is equivalent to
695 <command>daemon-reload</command>)
696 to ensure the changes are taken into
697 account immediately. Note that this
698 does not have the effect that any of
699 the units enabled are also started at
700 the same time. If this is desired
701 a separate <command>start</command>
702 command must be invoked for the unit.
703 Also note that in case of instance
704 enablement, symlinks named same as
705 instances are created in install
706 location, however they all point to
707 the same template unit file.</para>
709 <para>This command will
710 print the actions executed. This
711 output may be suppressed by passing
712 <option>--quiet</option>.</para>
714 <para>Note that this operation creates
715 only the suggested symlinks for the
716 units. While this command is the
717 recommended way to manipulate the unit
718 configuration directory, the
719 administrator is free to make
720 additional changes manually, by
721 placing or removing symlinks in the
722 directory. This is particularly useful
723 to create configurations that deviate
724 from the suggested default
725 installation. In this case the
726 administrator must make sure to invoke
727 <command>daemon-reload</command>
728 manually as necessary, to ensure his
729 changes are taken into account.</para>
731 <para>Enabling units should not be
732 confused with starting (activating)
733 units, as done by the
734 <command>start</command>
735 command. Enabling and starting units
736 is orthogonal: units may be enabled
737 without being started and started
738 without being enabled. Enabling simply
739 hooks the unit into various suggested
740 places (for example, so that the unit
741 is automatically started on boot or
742 when a particular kind of hardware is
743 plugged in). Starting actually spawns
744 the daemon process (in case of service
745 units), or binds the socket (in case
746 of socket units), and so
749 <para>Depending on whether
750 <option>--system</option>,
751 <option>--user</option> or
752 <option>--global</option> is specified
753 this enables the unit for the system,
754 for the calling user only
755 or for all future logins of all
756 users. Note that in the latter case no
757 systemd daemon configuration is
763 <term><command>disable [NAME...]</command></term>
765 <listitem><para>Disables one or more
766 units. This removes all symlinks to
767 the specified unit files from the unit
768 configuration directory, and hence
769 undoes the changes made by
770 <command>enable</command>. Note
771 however that this removes
772 all symlinks to the unit files
773 (i.e. including manual additions), not
774 just those actually created by
775 <command>enable</command>. This call
776 implicitly reloads the systemd daemon
777 configuration after completing the
778 disabling of the units. Note that this
779 command does not implicitly stop the
780 units that is being disabled. If this
781 is desired an additional
782 <command>stop</command> command should
783 be executed afterwards.</para>
785 <para>This command will print the
786 actions executed. This output may be
787 suppressed by passing
788 <option>--quiet</option>.</para>
791 <para>This command honors
792 <option>--system</option>,
793 <option>--user</option>,
794 <option>--global</option> in a similar
796 <command>enable</command>.</para>
800 <term><command>is-enabled [NAME...]</command></term>
802 <listitem><para>Checks whether any of
803 the specified unit files is enabled
805 <command>enable</command>). Returns an
806 exit code of 0 if at least one is
807 enabled, non-zero otherwise. Prints
808 the current enable status. To suppress
810 <option>--quiet</option>.</para></listitem>
814 <term><command>reenable [NAME...]</command></term>
816 <listitem><para>Reenable one or more
817 unit files, as specified on the
818 command line. This is a combination of
819 <command>disable</command> and
820 <command>enable</command> and is
821 useful to reset the symlinks a unit is
822 enabled with to the defaults
824 <literal>[Install]</literal> section
825 of the unit file.</para>
830 <term><command>preset [NAME...]</command></term>
832 <listitem><para>Reset one or more unit
833 files, as specified on the command
834 line, to the defaults configured in
835 the preset policy files. This has the
837 <command>disable</command> or
838 <command>enable</command>, depending
839 how the unit is listed in the preset
840 files. For more information on preset
842 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For
843 more information on the concept of
844 presets please consult the <ulink
845 url="http://freedesktop.org/wiki/Software/systemd/Preset">Preset</ulink>
851 <term><command>mask [NAME...]</command></term>
853 <listitem><para>Mask one or more unit
854 files, as specified on the command
855 line. This will link these units to
856 <filename>/dev/null</filename>, making
857 it impossible to start them. This is a stronger version
858 of <command>disable</command>, since
859 it prohibits all kinds of activation
860 of the unit, including manual
861 activation. Use this option with
867 <term><command>unmask [NAME...]</command></term>
869 <listitem><para>Unmask one or more
870 unit files, as specified on the
871 command line. This will undo the
873 <command>mask</command>.</para>
878 <term><command>link [NAME...]</command></term>
880 <listitem><para>Link a unit file that
881 is not in the unit file search paths
882 into the unit file search path. This
883 requires an absolute path to a unit
884 file. The effect of this can be undone
885 with <command>disable</command>. The
886 effect of this command is that a unit
887 file is available for
888 <command>start</command> and other
889 commands although it isn't installed
890 directly in the unit search
896 <term><command>load [NAME...]</command></term>
898 <listitem><para>Load one or more units
899 specified on the command line. This
900 will simply load their configuration
901 from disk, but not start them. To
902 start them you need to use the
903 <command>start</command> command which
904 will implicitly load a unit that has
905 not been loaded yet. Note that systemd
906 garbage collects loaded units that are
907 not active or referenced by an active
908 unit. This means that units loaded
909 this way will usually not stay loaded
910 for long. Also note that this command
911 cannot be used to reload unit
912 configuration. Use the
913 <command>daemon-reload</command>
914 command for that. All in all, this
915 command is of little use except for
917 <para>This command should not be
919 <command>daemon-reload</command> or
920 <command>reload</command>
921 commands.</para></listitem>
924 <term><command>list-jobs</command></term>
926 <listitem><para>List jobs that are in progress.</para></listitem>
929 <term><command>cancel [JOB...]</command></term>
931 <listitem><para>Cancel one or more
932 jobs specified on the command line by
934 IDs. If no job id is specified, cancel all pending jobs.</para></listitem>
937 <term><command>dump</command></term>
939 <listitem><para>Dump server
940 status. This will output a (usually
941 very long) human readable manager
942 status dump. Its format is subject to
943 change without notice and should not
945 applications.</para></listitem>
948 <term><command>dot</command></term>
950 <listitem><para>Generate textual
951 dependency graph description in dot
952 format for further processing with the
954 <citerefentry><refentrytitle>dot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
955 tool. Use a command line like
956 <command>systemctl dot | dot -Tsvg >
957 systemd.svg</command> to generate a
958 graphical dependency tree. Unless
959 <option>--order</option> or
960 <option>--require</option> is passed
961 the generated graph will show both
962 ordering and requirement
963 dependencies.</para></listitem>
966 <term><command>snapshot [NAME]</command></term>
968 <listitem><para>Create a snapshot. If
969 a snapshot name is specified, the new
970 snapshot will be named after it. If
971 none is specified an automatic
972 snapshot name is generated. In either
973 case, the snapshot name used is
974 printed to STDOUT, unless
975 <option>--quiet</option> is
978 <para>A snapshot refers to a saved
979 state of the systemd manager. It is
980 implemented itself as a unit that is
981 generated dynamically with this
982 command and has dependencies on all
983 units active at the time. At a later
984 time the user may return to this state
986 <command>isolate</command> command on
987 the snapshot unit.</para></listitem>
989 <para>Snapshots are only useful for
990 saving and restoring which units are
991 running or are stopped, they do not
992 save/restore any other
993 state. Snapshots are dynamic and lost
997 <term><command>delete [NAME...]</command></term>
999 <listitem><para>Remove a snapshot
1000 previously created with
1001 <command>snapshot</command>.</para></listitem>
1004 <term><command>daemon-reload</command></term>
1006 <listitem><para>Reload systemd manager
1007 configuration. This will reload all
1008 unit files and recreate the entire
1009 dependency tree. While the daemon is
1010 reloaded, all sockets systemd listens
1011 on on behalf of user configuration will
1012 stay accessible.</para> <para>This
1013 command should not be confused with
1014 the <command>load</command> or
1015 <command>reload</command>
1016 commands.</para></listitem>
1019 <term><command>daemon-reexec</command></term>
1021 <listitem><para>Reexecute the systemd
1022 manager. This will serialize the
1023 manager state, reexecute the process
1024 and deserialize the state again. This
1025 command is of little use except for
1026 debugging and package
1027 upgrades. Sometimes it might be
1028 helpful as a heavy-weight
1029 <command>daemon-reload</command>. While
1030 the daemon is reexecuted all sockets
1031 systemd listens on on behalf of user
1032 configuration will stay
1033 accessible.</para></listitem>
1036 <term><command>show-environment</command></term>
1038 <listitem><para>Dump the systemd
1039 manager environment block. The
1040 environment block will be dumped in
1041 straight-forward form suitable for
1042 sourcing into a shell script. This
1043 environment block will be passed to
1044 all processes the manager
1045 spawns.</para></listitem>
1048 <term><command>set-environment [NAME=VALUE...]</command></term>
1050 <listitem><para>Set one or more
1051 systemd manager environment variables,
1052 as specified on the command
1053 line.</para></listitem>
1056 <term><command>unset-environment [NAME...]</command></term>
1058 <listitem><para>Unset one or more
1059 systemd manager environment
1060 variables. If only a variable name is
1061 specified it will be removed
1062 regardless of its value. If a variable
1063 and a value are specified the variable
1064 is only removed if it has the
1065 specified value.</para></listitem>
1068 <term><command>default</command></term>
1070 <listitem><para>Enter default
1071 mode. This is mostly equivalent to
1073 default.target</command>.</para></listitem>
1076 <term><command>rescue</command></term>
1078 <listitem><para>Enter rescue
1079 mode. This is mostly equivalent to
1081 rescue.target</command> but also
1082 prints a wall message to all
1083 users.</para></listitem>
1086 <term><command>emergency</command></term>
1088 <listitem><para>Enter emergency
1089 mode. This is mostly equivalent to
1091 emergency.target</command> but also
1092 prints a wall message to all
1093 users.</para></listitem>
1096 <term><command>halt</command></term>
1098 <listitem><para>Shut down and halt the
1099 system. This is mostly equivalent to
1100 <command>start halt.target</command>
1101 but also prints a wall message to all
1102 users. If combined with
1103 <option>--force</option> shutdown of
1104 all running services is skipped,
1105 however all processes are killed and
1106 all file systems are unmounted or
1107 mounted read-only, immediately
1108 followed by the system halt. If
1109 <option>--force</option> is specified
1110 twice the operation is immediately
1111 executed without terminating any
1112 processes or unmounting any file
1113 systems. This may result in data
1114 loss.</para></listitem>
1117 <term><command>poweroff</command></term>
1119 <listitem><para>Shut down and
1120 power-off the system. This is mostly
1121 equivalent to <command>start
1122 poweroff.target</command> but also
1123 prints a wall message to all users. If
1124 combined with <option>--force</option>
1125 shutdown of all running services is
1126 skipped, however all processes are
1127 killed and all file systems are
1128 unmounted or mounted read-only,
1129 immediately followed by the powering
1130 off. If <option>--force</option> is
1131 specified twice the operation is
1132 immediately executed without
1133 terminating any processes or
1134 unmounting any file systems. This may
1135 result in data loss.</para></listitem>
1138 <term><command>reboot</command></term>
1140 <listitem><para>Shut down and reboot
1141 the system. This is mostly equivalent
1143 reboot.target</command> but also
1144 prints a wall message to all users. If
1145 combined with <option>--force</option>
1146 shutdown of all running services is
1147 skipped, however all processes are
1148 killed and all file systems are
1149 unmounted or mounted read-only,
1150 immediately followed by the reboot. If
1151 <option>--force</option> is specified
1152 twice the operation is immediately
1153 executed without terminating any
1154 processes or unmounting any file
1155 systems. This may result in data
1156 loss.</para></listitem>
1159 <term><command>kexec</command></term>
1161 <listitem><para>Shut down and reboot
1162 the system via kexec. This is mostly
1163 equivalent to <command>start
1164 kexec.target</command> but also prints
1165 a wall message to all users. If
1166 combined with <option>--force</option>
1167 shutdown of all running services is
1168 skipped, however all processes are killed
1169 and all file systems are unmounted or
1170 mounted read-only, immediately
1172 reboot.</para></listitem>
1175 <term><command>exit</command></term>
1177 <listitem><para>Ask the systemd
1178 manager to quit. This is only
1179 supported for user service managers
1180 (i.e. in conjunction with the
1181 <option>--user</option> option) and
1182 will fail otherwise.</para></listitem>
1185 <term><command>suspend</command></term>
1187 <listitem><para>Suspend the system.</para></listitem>
1190 <term><command>hibernate</command></term>
1192 <listitem><para>Hibernate the system.</para></listitem>
1195 <term><command>switch-root [ROOT] [INIT]</command></term>
1197 <listitem><para>Switches to a
1198 different root directory and executes
1199 a new system manager process below
1200 it. This is intended for usage in
1201 initial RAM disks ("initrd"), and will
1202 transition from the initrd's system
1203 manager process (a.k.a "init" process)
1204 to the main system manager
1205 process. Takes two arguments: the
1206 directory to make the new root
1207 directory, and the path to the new
1208 system manager binary below it to
1209 execute as PID 1. If the latter is
1210 omitted or the empty string, a
1211 systemd binary will automatically be
1212 searched for and used as init. If the
1213 system manager path is omitted or
1214 equal the empty string the state of
1215 the initrd's system manager process is
1216 passed to the main system manager,
1217 which allows later introspection of the
1218 state of the services involved in the
1219 initrd boot.</para></listitem>
1226 <title>Exit status</title>
1228 <para>On success 0 is returned, a non-zero failure
1229 code otherwise.</para>
1233 <title>Environment</title>
1237 <term><varname>$SYSTEMD_PAGER</varname></term>
1238 <listitem><para>Pager to use when
1239 <option>--no-pager</option> is not given;
1240 overrides <varname>$PAGER</varname>. Setting
1241 this to an empty string or the value
1242 <literal>cat</literal> is equivalent to passing
1243 <option>--no-pager</option>.</para></listitem>
1249 <title>See Also</title>
1251 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1252 <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1253 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1254 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1255 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1256 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1257 <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1258 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>