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
110 <para>As a special case, if the argument
111 is <option>help</option>, a list of
112 allowed values will be printed and the
113 program will exit.</para>
118 <term><option>--property=</option></term>
119 <term><option>-p</option></term>
121 <listitem><para>When showing
122 unit/job/manager properties, limit
123 display to certain properties as
124 specified as argument. If not
125 specified all set properties are
126 shown. The argument should be a
127 property name, such as
128 <literal>MainPID</literal>. If
129 specified more than once all
130 properties with the specified names
131 are shown.</para></listitem>
135 <term><option>--all</option></term>
136 <term><option>-a</option></term>
138 <listitem><para>When listing units,
139 show all units, regardless of their
140 state, including inactive units. When
141 showing unit/job/manager properties,
142 show all properties regardless whether
143 they are set or not.</para></listitem>
147 <term><option>--failed</option></term>
149 <listitem><para>When listing units,
150 show only failed units. Do not confuse
152 <option>--fail</option>.</para></listitem>
156 <term><option>--full</option></term>
158 <listitem><para>Do not ellipsize unit
159 names and truncate unit descriptions
161 <command>list-units</command> and
162 <command>list-jobs</command>.</para></listitem>
166 <term><option>--fail</option></term>
168 <listitem><para>If the requested
169 operation conflicts with a pending
170 unfinished job, fail the command. If
171 this is not specified the requested
172 operation will replace the pending job,
173 if necessary. Do not confuse
175 <option>--failed</option>.</para></listitem>
179 <term><option>--ignore-dependencies</option></term>
181 <listitem><para>When enqueuing a new
182 job ignore all its dependencies and
183 execute it immediately. If passed no
184 required units of the unit passed will
185 be pulled in, and no ordering
186 dependencies will be honored. This is
187 mostly a debugging and rescue tool for
188 the administrator and should not be
190 applications.</para></listitem>
194 <term><option>--quiet</option></term>
195 <term><option>-q</option></term>
197 <listitem><para>Suppress output to
199 <command>snapshot</command>,
200 <command>is-active</command>,
201 <command>is-failed</command>,
202 <command>enable</command> and
203 <command>disable</command>.</para></listitem>
207 <term><option>--no-block</option></term>
209 <listitem><para>Do not synchronously wait for
210 the requested operation to finish. If this is
211 not specified the job will be verified,
212 enqueued and <command>systemctl</command> will
213 wait until it is completed. By passing this
214 argument it is only verified and
215 enqueued.</para></listitem>
219 <term><option>--no-legend</option></term>
221 <listitem><para>Do not print a legend, i.e.
222 the column headers and the footer with hints.
227 <term><option>--no-pager</option></term>
229 <listitem><para>Do not pipe output into a
230 pager.</para></listitem>
234 <term><option>--system</option></term>
236 <listitem><para>Talk to the systemd
237 system manager. (Default)</para></listitem>
241 <term><option>--user</option></term>
243 <listitem><para>Talk to the systemd
244 manager of the calling user.</para></listitem>
248 <term><option>--order</option></term>
249 <term><option>--require</option></term>
251 <listitem><para>When used in
253 <command>dot</command> command (see
254 below), selects which dependencies are
255 shown in the dependency graph. If
256 <option>--order</option> is passed
257 only dependencies of type
258 <varname>After=</varname> or
259 <varname>Before=</varname> are
260 shown. If <option>--require</option>
261 is passed only dependencies of type
262 <varname>Requires=</varname>,
263 <varname>RequiresOverridable=</varname>,
264 <varname>Requisite=</varname>,
265 <varname>RequisiteOverridable=</varname>,
266 <varname>Wants=</varname> and
267 <varname>Conflicts=</varname> are
268 shown. If neither is passed, shows
269 dependencies of all these
270 types.</para></listitem>
274 <term><option>--no-wall</option></term>
276 <listitem><para>Don't send wall
278 halt, power-off, reboot.</para></listitem>
282 <term><option>--global</option></term>
284 <listitem><para>When used with
285 <command>enable</command> and
286 <command>disable</command>, operate on the
287 global user configuration
288 directory, thus enabling or disabling
289 a unit file globally for all future
290 logins of all users.</para></listitem>
294 <term><option>--no-reload</option></term>
296 <listitem><para>When used with
297 <command>enable</command> and
298 <command>disable</command>, do not
299 implicitly reload daemon configuration
301 changes.</para></listitem>
305 <term><option>--no-ask-password</option></term>
307 <listitem><para>When used with
308 <command>start</command> and related
309 commands, disables asking for
310 passwords. Background services may
311 require input of a password or
312 passphrase string, for example to
313 unlock system hard disks or
314 cryptographic certificates. Unless
315 this option is specified and the
316 command is invoked from a terminal
317 <command>systemctl</command> will
318 query the user on the terminal for the
319 necessary secrets. Use this option to
320 switch this behavior off. In this case
321 the password must be supplied by some
322 other means (for example graphical
323 password agents) or the service might
324 fail. This also disables querying the
325 user for authentication for privileged
326 operations.</para></listitem>
330 <term><option>--kill-who=</option></term>
332 <listitem><para>When used with
333 <command>kill</command>, choose which
334 processes to kill. Must be one of
335 <option>main</option>,
336 <option>control</option> or
337 <option>all</option> to select whether
338 to kill only the main process of the
339 unit, the control process or all
340 processes of the unit. If omitted
342 <option>all</option>.</para></listitem>
346 <term><option>--signal=</option></term>
347 <term><option>-s</option></term>
349 <listitem><para>When used with
350 <command>kill</command>, choose which
351 signal to send to selected
352 processes. Must be one of the well
353 known signal specifiers such as
354 SIGTERM, SIGINT or SIGSTOP. If
356 <option>SIGTERM</option>.</para></listitem>
360 <term><option>--force</option></term>
361 <term><option>-f</option></term>
363 <listitem><para>When used with
364 <command>enable</command>, overwrite any
366 symlinks.</para></listitem>
368 <listitem><para>When used with
369 <command>halt</command>,
370 <command>poweroff</command>,
371 <command>reboot</command> or
372 <command>kexec</command> execute the
373 selected operation without shutting
374 down all units. However, all processes
375 will be killed forcibly and all file
376 systems are unmounted or remounted
377 read-only. This is hence a drastic but
378 relatively safe option to request an
380 <option>--force</option> is specified
381 twice for these operations, they will
382 be executed immediately without
383 terminating any processes or umounting
384 any file systems. Warning: specifying
385 <option>--force</option> twice with
386 any of these operations might result
387 in data loss.</para></listitem>
391 <term><option>--root=</option></term>
393 <listitem><para>When used with
394 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and
395 related commands), use alternative
396 root path when looking for unit
397 files.</para></listitem>
401 <term><option>--runtime</option></term>
403 <listitem><para>When used with
404 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and related commands), make
405 changes only temporarily, so that they
406 are dropped on the next reboot. This
407 will have the effect that changes are
408 not made in subdirectories of
409 <filename>/etc</filename> but in
410 <filename>/run</filename>, with
411 identical immediate effects, however,
412 since the latter is lost on reboot,
414 too.</para></listitem>
418 <term><option>-H</option></term>
419 <term><option>--host</option></term>
421 <listitem><para>Execute operation
422 remotely. Specify a hostname, or
423 username and hostname separated by @,
424 to connect to. This will use SSH to
425 talk to the remote systemd
426 instance.</para></listitem>
430 <term><option>-P</option></term>
431 <term><option>--privileged</option></term>
433 <listitem><para>Acquire privileges via
434 PolicyKit before executing the
435 operation.</para></listitem>
439 <term><option>--lines=</option></term>
440 <term><option>-n</option></term>
442 <listitem><para>When used with
443 <command>status</command> controls the
444 number of journal lines to show,
445 counting from the most recent
446 ones. Takes a positive integer
447 argument. Defaults to
448 10.</para></listitem>
452 <term><option>--output=</option></term>
453 <term><option>-o</option></term>
455 <listitem><para>When used with
456 <command>status</command> controls the
457 formatting of the journal entries that
458 are shown. For the available choices
460 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. Defaults
462 <literal>short</literal>.</para></listitem>
467 <para>The following commands are understood:</para>
471 <term><command>list-units</command></term>
473 <listitem><para>List known units.</para></listitem>
476 <term><command>start [NAME...]</command></term>
478 <listitem><para>Start (activate) one
479 or more units specified on the command
480 line.</para></listitem>
483 <term><command>stop [NAME...]</command></term>
485 <listitem><para>Stop (deactivate) one
486 or more units specified on the command
487 line.</para></listitem>
490 <term><command>reload [NAME...]</command></term>
492 <listitem><para>Asks all units listed
493 on the command line to reload their
494 configuration. Note that this will
495 reload the service-specific
496 configuration, not the unit
497 configuration file of systemd. If you
498 want systemd to reload the
499 configuration file of a unit use the
500 <command>daemon-reload</command>
501 command. In other words: for the
502 example case of Apache, this will
504 <filename>httpd.conf</filename> in the
506 <filename>apache.service</filename>
507 systemd unit file. </para>
509 <para>This command should not be
511 <command>daemon-reload</command> or
512 <command>load</command>
513 commands.</para></listitem>
517 <term><command>restart [NAME...]</command></term>
519 <listitem><para>Restart one or more
520 units specified on the command
521 line. If the units are not running yet
523 started.</para></listitem>
526 <term><command>try-restart [NAME...]</command></term>
528 <listitem><para>Restart one or more
529 units specified on the command
530 line if the units are running. Do
531 nothing if units are not running.
532 Note that for compatibility
533 with Red Hat init scripts
534 <command>condrestart</command> is
535 equivalent to this command.</para></listitem>
538 <term><command>reload-or-restart [NAME...]</command></term>
540 <listitem><para>Reload one or more
541 units if they support it. If not,
542 restart them instead. If the units
543 are not running yet they will be
544 started.</para></listitem>
547 <term><command>reload-or-try-restart [NAME...]</command></term>
549 <listitem><para>Reload one or more
550 units if they support it. If not,
551 restart them instead. Do nothing if
552 the units are not running. Note that
553 for compatibility with SysV init
555 <command>force-reload</command> is
557 command.</para></listitem>
560 <term><command>isolate [NAME]</command></term>
562 <listitem><para>Start the unit
563 specified on the command line and its
564 dependencies and stop all others.</para>
566 <para>This is similar to changing the
567 runlevel in a traditional init system. The
568 <command>isolate</command> command will
569 immediately stop processes that are not
570 enabled in the new unit, possibly including
571 the graphical environment or terminal you
572 are currently using.</para>
574 <para>Note that this works only on units
575 where <option>AllowIsolate=</option> is
577 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
578 for details.</para></listitem>
581 <term><command>kill [NAME...]</command></term>
583 <listitem><para>Send a signal to one
584 or more processes of the unit. Use
585 <option>--kill-who=</option> to select
586 which process to kill. Use
587 <option>--kill-mode=</option> to
588 select the kill mode and
589 <option>--signal=</option> to select
590 the signal to send.</para></listitem>
593 <term><command>is-active [NAME...]</command></term>
595 <listitem><para>Check whether any of
596 the specified units are active
597 (i.e. running). Returns an exit code
598 0 if at least one is active, non-zero
600 <option>--quiet</option> is specified
601 this will also print the current unit
602 state to STDOUT.</para></listitem>
605 <term><command>is-failed [NAME...]</command></term>
607 <listitem><para>Check whether any of
608 the specified units are failed.
610 0 if at least one is failed, non-zero
612 <option>--quiet</option> is specified
613 this will also print the current unit
614 state to STDOUT.</para></listitem>
617 <term><command>status [NAME...|PID...]</command></term>
619 <listitem><para>Show terse runtime
620 status information about one or more
621 units, followed by its most recent log
622 data from the journal. This function
623 is intended to generate human-readable
624 output. If you are looking for
625 computer-parsable output, use
626 <command>show</command> instead. If a
627 PID is passed information about the
628 unit the process of the PID belongs to
629 is shown.</para></listitem>
632 <term><command>show [NAME...|JOB...]</command></term>
634 <listitem><para>Show properties of one
635 or more units, jobs or the manager
636 itself. If no argument is specified
637 properties of the manager will be
638 shown. If a unit name is specified
639 properties of the unit is shown, and
640 if a job id is specified properties of
641 the job is shown. By default, empty
642 properties are suppressed. Use
643 <option>--all</option> to show those
644 too. To select specific properties to
646 <option>--property=</option>. This
647 command is intended to be used
648 whenever computer-parsable output is
650 <command>status</command> if you are
651 looking for formatted human-readable
652 output.</para></listitem>
655 <term><command>help [NAME...|PID...]</command></term>
657 <listitem><para>Show manual pages for
658 one or more units, if available. If a
659 PID is passed the manual pages for the
660 unit the process of the PID belongs to
661 is shown.</para></listitem>
664 <term><command>reset-failed [NAME...]</command></term>
666 <listitem><para>Reset the
667 '<literal>failed</literal>' state of the
668 specified units, or if no unit name is
669 passed of all units. When a unit fails
670 in some way (i.e. process exiting with
671 non-zero error code, terminating
672 abnormally or timing out) it will
673 automatically enter the
674 '<literal>failed</literal>' state and
675 its exit code and status is recorded
676 for introspection by the administrator
677 until the service is restarted or
679 command.</para></listitem>
683 <term><command>list-unit-files</command></term>
685 <listitem><para>List installed unit files.
690 <term><command>enable [NAME...]</command></term>
692 <listitem><para>Enable one or
693 more unit files or unit file
694 instances, as specified on the
695 command line. This will create a
696 number of symlinks as encoded in
697 the <literal>[Install]</literal>
698 sections of the unit files. After
699 the symlinks have been created the
700 systemd configuration is reloaded
701 (in a way that is equivalent to
702 <command>daemon-reload</command>)
703 to ensure the changes are taken into
704 account immediately. Note that this
705 does not have the effect that any of
706 the units enabled are also started at
707 the same time. If this is desired
708 a separate <command>start</command>
709 command must be invoked for the unit.
710 Also note that in case of instance
711 enablement, symlinks named same as
712 instances are created in install
713 location, however they all point to
714 the same template unit file.</para>
716 <para>This command will
717 print the actions executed. This
718 output may be suppressed by passing
719 <option>--quiet</option>.</para>
721 <para>Note that this operation creates
722 only the suggested symlinks for the
723 units. While this command is the
724 recommended way to manipulate the unit
725 configuration directory, the
726 administrator is free to make
727 additional changes manually, by
728 placing or removing symlinks in the
729 directory. This is particularly useful
730 to create configurations that deviate
731 from the suggested default
732 installation. In this case the
733 administrator must make sure to invoke
734 <command>daemon-reload</command>
735 manually as necessary, to ensure his
736 changes are taken into account.</para>
738 <para>Enabling units should not be
739 confused with starting (activating)
740 units, as done by the
741 <command>start</command>
742 command. Enabling and starting units
743 is orthogonal: units may be enabled
744 without being started and started
745 without being enabled. Enabling simply
746 hooks the unit into various suggested
747 places (for example, so that the unit
748 is automatically started on boot or
749 when a particular kind of hardware is
750 plugged in). Starting actually spawns
751 the daemon process (in case of service
752 units), or binds the socket (in case
753 of socket units), and so
756 <para>Depending on whether
757 <option>--system</option>,
758 <option>--user</option> or
759 <option>--global</option> is specified
760 this enables the unit for the system,
761 for the calling user only
762 or for all future logins of all
763 users. Note that in the latter case no
764 systemd daemon configuration is
770 <term><command>disable [NAME...]</command></term>
772 <listitem><para>Disables one or more
773 units. This removes all symlinks to
774 the specified unit files from the unit
775 configuration directory, and hence
776 undoes the changes made by
777 <command>enable</command>. Note
778 however that this removes
779 all symlinks to the unit files
780 (i.e. including manual additions), not
781 just those actually created by
782 <command>enable</command>. This call
783 implicitly reloads the systemd daemon
784 configuration after completing the
785 disabling of the units. Note that this
786 command does not implicitly stop the
787 units that are being disabled. If this
788 is desired an additional
789 <command>stop</command> command should
790 be executed afterwards.</para>
792 <para>This command will print the
793 actions executed. This output may be
794 suppressed by passing
795 <option>--quiet</option>.</para>
798 <para>This command honors
799 <option>--system</option>,
800 <option>--user</option>,
801 <option>--global</option> in a similar
803 <command>enable</command>.</para>
807 <term><command>is-enabled [NAME...]</command></term>
809 <listitem><para>Checks whether any of
810 the specified unit files are enabled
812 <command>enable</command>). Returns an
813 exit code of 0 if at least one is
814 enabled, non-zero otherwise. Prints
815 the current enable status. To suppress
817 <option>--quiet</option>.</para></listitem>
821 <term><command>reenable [NAME...]</command></term>
823 <listitem><para>Reenable one or more
824 unit files, as specified on the
825 command line. This is a combination of
826 <command>disable</command> and
827 <command>enable</command> and is
828 useful to reset the symlinks a unit is
829 enabled with to the defaults
831 <literal>[Install]</literal> section
832 of the unit file.</para>
837 <term><command>preset [NAME...]</command></term>
839 <listitem><para>Reset one or more unit
840 files, as specified on the command
841 line, to the defaults configured in
842 the preset policy files. This has the
844 <command>disable</command> or
845 <command>enable</command>, depending
846 how the unit is listed in the preset
847 files. For more information on preset
849 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For
850 more information on the concept of
851 presets please consult the <ulink
852 url="http://freedesktop.org/wiki/Software/systemd/Preset">Preset</ulink>
858 <term><command>mask [NAME...]</command></term>
860 <listitem><para>Mask one or more unit
861 files, as specified on the command
862 line. This will link these units to
863 <filename>/dev/null</filename>, making
864 it impossible to start them. This is a stronger version
865 of <command>disable</command>, since
866 it prohibits all kinds of activation
867 of the unit, including manual
868 activation. Use this option with
874 <term><command>unmask [NAME...]</command></term>
876 <listitem><para>Unmask one or more
877 unit files, as specified on the
878 command line. This will undo the
880 <command>mask</command>.</para>
885 <term><command>link [NAME...]</command></term>
887 <listitem><para>Link a unit file that
888 is not in the unit file search paths
889 into the unit file search path. This
890 requires an absolute path to a unit
891 file. The effect of this can be undone
892 with <command>disable</command>. The
893 effect of this command is that a unit
894 file is available for
895 <command>start</command> and other
896 commands although it isn't installed
897 directly in the unit search
903 <term><command>load [NAME...]</command></term>
905 <listitem><para>Load one or more units
906 specified on the command line. This
907 will simply load their configuration
908 from disk, but not start them. To
909 start them you need to use the
910 <command>start</command> command which
911 will implicitly load a unit that has
912 not been loaded yet. Note that systemd
913 garbage collects loaded units that are
914 not active or referenced by an active
915 unit. This means that units loaded
916 this way will usually not stay loaded
917 for long. Also note that this command
918 cannot be used to reload unit
919 configuration. Use the
920 <command>daemon-reload</command>
921 command for that. All in all, this
922 command is of little use except for
924 <para>This command should not be
926 <command>daemon-reload</command> or
927 <command>reload</command>
928 commands.</para></listitem>
931 <term><command>list-jobs</command></term>
933 <listitem><para>List jobs that are in progress.</para></listitem>
936 <term><command>cancel [JOB...]</command></term>
938 <listitem><para>Cancel one or more
939 jobs specified on the command line by
941 IDs. If no job id is specified, cancel all pending jobs.</para></listitem>
944 <term><command>dump</command></term>
946 <listitem><para>Dump server
947 status. This will output a (usually
948 very long) human readable manager
949 status dump. Its format is subject to
950 change without notice and should not
952 applications.</para></listitem>
955 <term><command>dot</command></term>
957 <listitem><para>Generate textual
958 dependency graph description in dot
959 format for further processing with the
961 <citerefentry><refentrytitle>dot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
962 tool. Use a command line like
963 <command>systemctl dot | dot -Tsvg >
964 systemd.svg</command> to generate a
965 graphical dependency tree. Unless
966 <option>--order</option> or
967 <option>--require</option> is passed
968 the generated graph will show both
969 ordering and requirement
970 dependencies.</para></listitem>
973 <term><command>snapshot [NAME]</command></term>
975 <listitem><para>Create a snapshot. If
976 a snapshot name is specified, the new
977 snapshot will be named after it. If
978 none is specified an automatic
979 snapshot name is generated. In either
980 case, the snapshot name used is
981 printed to STDOUT, unless
982 <option>--quiet</option> is
985 <para>A snapshot refers to a saved
986 state of the systemd manager. It is
987 implemented itself as a unit that is
988 generated dynamically with this
989 command and has dependencies on all
990 units active at the time. At a later
991 time the user may return to this state
993 <command>isolate</command> command on
994 the snapshot unit.</para></listitem>
996 <para>Snapshots are only useful for
997 saving and restoring which units are
998 running or are stopped, they do not
999 save/restore any other
1000 state. Snapshots are dynamic and lost
1004 <term><command>delete [NAME...]</command></term>
1006 <listitem><para>Remove a snapshot
1007 previously created with
1008 <command>snapshot</command>.</para></listitem>
1011 <term><command>daemon-reload</command></term>
1013 <listitem><para>Reload systemd manager
1014 configuration. This will reload all
1015 unit files and recreate the entire
1016 dependency tree. While the daemon is
1017 reloaded, all sockets systemd listens
1018 on on behalf of user configuration will
1019 stay accessible.</para> <para>This
1020 command should not be confused with
1021 the <command>load</command> or
1022 <command>reload</command>
1023 commands.</para></listitem>
1026 <term><command>daemon-reexec</command></term>
1028 <listitem><para>Reexecute the systemd
1029 manager. This will serialize the
1030 manager state, reexecute the process
1031 and deserialize the state again. This
1032 command is of little use except for
1033 debugging and package
1034 upgrades. Sometimes it might be
1035 helpful as a heavy-weight
1036 <command>daemon-reload</command>. While
1037 the daemon is reexecuted all sockets
1038 systemd listens on on behalf of user
1039 configuration will stay
1040 accessible.</para></listitem>
1043 <term><command>show-environment</command></term>
1045 <listitem><para>Dump the systemd
1046 manager environment block. The
1047 environment block will be dumped in
1048 straight-forward form suitable for
1049 sourcing into a shell script. This
1050 environment block will be passed to
1051 all processes the manager
1052 spawns.</para></listitem>
1055 <term><command>set-environment [NAME=VALUE...]</command></term>
1057 <listitem><para>Set one or more
1058 systemd manager environment variables,
1059 as specified on the command
1060 line.</para></listitem>
1063 <term><command>unset-environment [NAME...]</command></term>
1065 <listitem><para>Unset one or more
1066 systemd manager environment
1067 variables. If only a variable name is
1068 specified it will be removed
1069 regardless of its value. If a variable
1070 and a value are specified the variable
1071 is only removed if it has the
1072 specified value.</para></listitem>
1075 <term><command>default</command></term>
1077 <listitem><para>Enter default
1078 mode. This is mostly equivalent to
1080 default.target</command>.</para></listitem>
1083 <term><command>rescue</command></term>
1085 <listitem><para>Enter rescue
1086 mode. This is mostly equivalent to
1088 rescue.target</command> but also
1089 prints a wall message to all
1090 users.</para></listitem>
1093 <term><command>emergency</command></term>
1095 <listitem><para>Enter emergency
1096 mode. This is mostly equivalent to
1098 emergency.target</command> but also
1099 prints a wall message to all
1100 users.</para></listitem>
1103 <term><command>halt</command></term>
1105 <listitem><para>Shut down and halt the
1106 system. This is mostly equivalent to
1107 <command>start halt.target</command>
1108 but also prints a wall message to all
1109 users. If combined with
1110 <option>--force</option> shutdown of
1111 all running services is skipped,
1112 however all processes are killed and
1113 all file systems are unmounted or
1114 mounted read-only, immediately
1115 followed by the system halt. If
1116 <option>--force</option> is specified
1117 twice the operation is immediately
1118 executed without terminating any
1119 processes or unmounting any file
1120 systems. This may result in data
1121 loss.</para></listitem>
1124 <term><command>poweroff</command></term>
1126 <listitem><para>Shut down and
1127 power-off the system. This is mostly
1128 equivalent to <command>start
1129 poweroff.target</command> but also
1130 prints a wall message to all users. If
1131 combined with <option>--force</option>
1132 shutdown of all running services is
1133 skipped, however all processes are
1134 killed and all file systems are
1135 unmounted or mounted read-only,
1136 immediately followed by the powering
1137 off. If <option>--force</option> is
1138 specified twice the operation is
1139 immediately executed without
1140 terminating any processes or
1141 unmounting any file systems. This may
1142 result in data loss.</para></listitem>
1145 <term><command>reboot</command></term>
1147 <listitem><para>Shut down and reboot
1148 the system. This is mostly equivalent
1150 reboot.target</command> but also
1151 prints a wall message to all users. If
1152 combined with <option>--force</option>
1153 shutdown of all running services is
1154 skipped, however all processes are
1155 killed and all file systems are
1156 unmounted or mounted read-only,
1157 immediately followed by the reboot. If
1158 <option>--force</option> is specified
1159 twice the operation is immediately
1160 executed without terminating any
1161 processes or unmounting any file
1162 systems. This may result in data
1163 loss.</para></listitem>
1166 <term><command>kexec</command></term>
1168 <listitem><para>Shut down and reboot
1169 the system via kexec. This is mostly
1170 equivalent to <command>start
1171 kexec.target</command> but also prints
1172 a wall message to all users. If
1173 combined with <option>--force</option>
1174 shutdown of all running services is
1175 skipped, however all processes are killed
1176 and all file systems are unmounted or
1177 mounted read-only, immediately
1179 reboot.</para></listitem>
1182 <term><command>exit</command></term>
1184 <listitem><para>Ask the systemd
1185 manager to quit. This is only
1186 supported for user service managers
1187 (i.e. in conjunction with the
1188 <option>--user</option> option) and
1189 will fail otherwise.</para></listitem>
1192 <term><command>suspend</command></term>
1194 <listitem><para>Suspend the
1195 system. This will trigger activation
1197 <filename>suspend.target</filename>
1198 target.</para></listitem>
1201 <term><command>hibernate</command></term>
1203 <listitem><para>Hibernate the
1204 system. This will trigger activation
1206 <filename>hibernate.target</filename>
1207 target.</para></listitem>
1210 <term><command>hybrid-sleep</command></term>
1212 <listitem><para>Hibernate and suspend
1213 the system. This will trigger
1214 activation of the special
1215 <filename>hybrid-sleep.target</filename>
1216 target.</para></listitem>
1219 <term><command>switch-root [ROOT] [INIT]</command></term>
1221 <listitem><para>Switches to a
1222 different root directory and executes
1223 a new system manager process below
1224 it. This is intended for usage in
1225 initial RAM disks ("initrd"), and will
1226 transition from the initrd's system
1227 manager process (a.k.a "init" process)
1228 to the main system manager
1229 process. Takes two arguments: the
1230 directory to make the new root
1231 directory, and the path to the new
1232 system manager binary below it to
1233 execute as PID 1. If the latter is
1234 omitted or the empty string, a
1235 systemd binary will automatically be
1236 searched for and used as init. If the
1237 system manager path is omitted or
1238 equal the empty string the state of
1239 the initrd's system manager process is
1240 passed to the main system manager,
1241 which allows later introspection of the
1242 state of the services involved in the
1243 initrd boot.</para></listitem>
1250 <title>Exit status</title>
1252 <para>On success 0 is returned, a non-zero failure
1253 code otherwise.</para>
1257 <title>Environment</title>
1261 <term><varname>$SYSTEMD_PAGER</varname></term>
1262 <listitem><para>Pager to use when
1263 <option>--no-pager</option> is not given;
1264 overrides <varname>$PAGER</varname>. Setting
1265 this to an empty string or the value
1266 <literal>cat</literal> is equivalent to passing
1267 <option>--no-pager</option>.</para></listitem>
1273 <title>See Also</title>
1275 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1276 <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1277 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1278 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1279 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1280 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1281 <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1282 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>