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>-h</option></term>
73 <term><option>--help</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>-t</option></term>
88 <term><option>--type=</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>-p</option></term>
119 <term><option>--property=</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>-a</option></term>
136 <term><option>--all</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, cgroup members, 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>-i</option></term>
195 <term><option>--ignore-inhibitors</option></term>
197 <listitem><para>When system shutdown
198 or a sleep state is requested, ignore
199 inhibitor locks. Applications can
200 establish inhibitor locks to avoid
201 that certain important operations
202 (such as CD burning or suchlike) are
203 interrupted by system shutdown or a
204 sleep state. Any user may take these
205 locks and privileged users may
206 override these locks. If any locks are
207 taken, shutdown and sleep state
208 requests will normally fail
209 (regardless if privileged or not) and
210 list of active locks is
212 <option>--ignore-inhibitors</option>
213 is specified the locks are ignored and
214 not printed, and the operation
215 attempted anyway, possibly requiring
217 privileges.</para></listitem>
221 <term><option>-q</option></term>
222 <term><option>--quiet</option></term>
224 <listitem><para>Suppress output to
226 <command>snapshot</command>,
227 <command>is-active</command>,
228 <command>is-failed</command>,
229 <command>enable</command> and
230 <command>disable</command>.</para></listitem>
234 <term><option>--no-block</option></term>
236 <listitem><para>Do not synchronously wait for
237 the requested operation to finish. If this is
238 not specified the job will be verified,
239 enqueued and <command>systemctl</command> will
240 wait until it is completed. By passing this
241 argument it is only verified and
242 enqueued.</para></listitem>
246 <term><option>--no-legend</option></term>
248 <listitem><para>Do not print a legend, i.e.
249 the column headers and the footer with hints.
254 <term><option>--no-pager</option></term>
256 <listitem><para>Do not pipe output into a
257 pager.</para></listitem>
261 <term><option>--system</option></term>
263 <listitem><para>Talk to the systemd
264 system manager. (Default)</para></listitem>
268 <term><option>--user</option></term>
270 <listitem><para>Talk to the systemd
271 manager of the calling user.</para></listitem>
275 <term><option>--no-wall</option></term>
277 <listitem><para>Don't send wall
279 halt, power-off, reboot.</para></listitem>
283 <term><option>--global</option></term>
285 <listitem><para>When used with
286 <command>enable</command> and
287 <command>disable</command>, operate on the
288 global user configuration
289 directory, thus enabling or disabling
290 a unit file globally for all future
291 logins of all users.</para></listitem>
295 <term><option>--no-reload</option></term>
297 <listitem><para>When used with
298 <command>enable</command> and
299 <command>disable</command>, do not
300 implicitly reload daemon configuration
302 changes.</para></listitem>
306 <term><option>--no-ask-password</option></term>
308 <listitem><para>When used with
309 <command>start</command> and related
310 commands, disables asking for
311 passwords. Background services may
312 require input of a password or
313 passphrase string, for example to
314 unlock system hard disks or
315 cryptographic certificates. Unless
316 this option is specified and the
317 command is invoked from a terminal
318 <command>systemctl</command> will
319 query the user on the terminal for the
320 necessary secrets. Use this option to
321 switch this behavior off. In this case
322 the password must be supplied by some
323 other means (for example graphical
324 password agents) or the service might
325 fail. This also disables querying the
326 user for authentication for privileged
327 operations.</para></listitem>
331 <term><option>--kill-who=</option></term>
333 <listitem><para>When used with
334 <command>kill</command>, choose which
335 processes to kill. Must be one of
336 <option>main</option>,
337 <option>control</option> or
338 <option>all</option> to select whether
339 to kill only the main process of the
340 unit, the control process or all
341 processes of the unit. If omitted
343 <option>all</option>.</para></listitem>
347 <term><option>-s</option></term>
348 <term><option>--signal=</option></term>
350 <listitem><para>When used with
351 <command>kill</command>, choose which
352 signal to send to selected
353 processes. Must be one of the well
354 known signal specifiers such as
355 SIGTERM, SIGINT or SIGSTOP. If
357 <option>SIGTERM</option>.</para></listitem>
361 <term><option>-f</option></term>
362 <term><option>--force</option></term>
364 <listitem><para>When used with
365 <command>enable</command>, overwrite any
367 symlinks.</para></listitem>
369 <listitem><para>When used with
370 <command>halt</command>,
371 <command>poweroff</command>,
372 <command>reboot</command> or
373 <command>kexec</command> execute the
374 selected operation without shutting
375 down all units. However, all processes
376 will be killed forcibly and all file
377 systems are unmounted or remounted
378 read-only. This is hence a drastic but
379 relatively safe option to request an
381 <option>--force</option> is specified
382 twice for these operations, they will
383 be executed immediately without
384 terminating any processes or umounting
385 any file systems. Warning: specifying
386 <option>--force</option> twice with
387 any of these operations might result
388 in data loss.</para></listitem>
392 <term><option>--root=</option></term>
394 <listitem><para>When used with
395 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and
396 related commands), use alternative
397 root path when looking for unit
398 files.</para></listitem>
402 <term><option>--runtime</option></term>
404 <listitem><para>When used with
405 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and related commands), make
406 changes only temporarily, so that they
407 are dropped on the next reboot. This
408 will have the effect that changes are
409 not made in subdirectories of
410 <filename>/etc</filename> but in
411 <filename>/run</filename>, with
412 identical immediate effects, however,
413 since the latter is lost on reboot,
415 too.</para></listitem>
419 <term><option>-H</option></term>
420 <term><option>--host</option></term>
422 <listitem><para>Execute operation
423 remotely. Specify a hostname, or
424 username and hostname separated by @,
425 to connect to. This will use SSH to
426 talk to the remote systemd
427 instance.</para></listitem>
431 <term><option>-P</option></term>
432 <term><option>--privileged</option></term>
434 <listitem><para>Acquire privileges via
435 PolicyKit before executing the
436 operation.</para></listitem>
440 <term><option>-n</option></term>
441 <term><option>--lines=</option></term>
443 <listitem><para>When used with
444 <command>status</command> controls the
445 number of journal lines to show,
446 counting from the most recent
447 ones. Takes a positive integer
448 argument. Defaults to
449 10.</para></listitem>
453 <term><option>-o</option></term>
454 <term><option>--output=</option></term>
456 <listitem><para>When used with
457 <command>status</command> controls the
458 formatting of the journal entries that
459 are shown. For the available choices
461 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. Defaults
463 <literal>short</literal>.</para></listitem>
468 <para>The following commands are understood:</para>
472 <term><command>list-units</command></term>
474 <listitem><para>List known units (subject to limitations
475 specified with <option>-t</option>).</para>
477 <para>This is the default command.</para></listitem>
480 <term><command>start [NAME...]</command></term>
482 <listitem><para>Start (activate) one
483 or more units specified on the command
484 line.</para></listitem>
487 <term><command>stop [NAME...]</command></term>
489 <listitem><para>Stop (deactivate) one
490 or more units specified on the command
491 line.</para></listitem>
494 <term><command>reload [NAME...]</command></term>
496 <listitem><para>Asks all units listed
497 on the command line to reload their
498 configuration. Note that this will
499 reload the service-specific
500 configuration, not the unit
501 configuration file of systemd. If you
502 want systemd to reload the
503 configuration file of a unit use the
504 <command>daemon-reload</command>
505 command. In other words: for the
506 example case of Apache, this will
508 <filename>httpd.conf</filename> in the
510 <filename>apache.service</filename>
511 systemd unit file. </para>
513 <para>This command should not be
515 <command>daemon-reload</command> or
516 <command>load</command>
517 commands.</para></listitem>
521 <term><command>restart [NAME...]</command></term>
523 <listitem><para>Restart one or more
524 units specified on the command
525 line. If the units are not running yet
527 started.</para></listitem>
530 <term><command>try-restart [NAME...]</command></term>
532 <listitem><para>Restart one or more
533 units specified on the command
534 line if the units are running. Do
535 nothing if units are not running.
536 Note that for compatibility
537 with Red Hat init scripts
538 <command>condrestart</command> is
539 equivalent to this command.</para></listitem>
542 <term><command>reload-or-restart [NAME...]</command></term>
544 <listitem><para>Reload one or more
545 units if they support it. If not,
546 restart them instead. If the units
547 are not running yet they will be
548 started.</para></listitem>
551 <term><command>reload-or-try-restart [NAME...]</command></term>
553 <listitem><para>Reload one or more
554 units if they support it. If not,
555 restart them instead. Do nothing if
556 the units are not running. Note that
557 for compatibility with SysV init
559 <command>force-reload</command> is
561 command.</para></listitem>
564 <term><command>isolate [NAME]</command></term>
566 <listitem><para>Start the unit
567 specified on the command line and its
568 dependencies and stop all others.</para>
570 <para>This is similar to changing the
571 runlevel in a traditional init system. The
572 <command>isolate</command> command will
573 immediately stop processes that are not
574 enabled in the new unit, possibly including
575 the graphical environment or terminal you
576 are currently using.</para>
578 <para>Note that this works only on units
579 where <option>AllowIsolate=</option> is
581 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
582 for details.</para></listitem>
585 <term><command>kill [NAME...]</command></term>
587 <listitem><para>Send a signal to one
588 or more processes of the unit. Use
589 <option>--kill-who=</option> to select
590 which process to kill. Use
591 <option>--kill-mode=</option> to
592 select the kill mode and
593 <option>--signal=</option> to select
594 the signal to send.</para></listitem>
597 <term><command>is-active [NAME...]</command></term>
599 <listitem><para>Check whether any of
600 the specified units are active
601 (i.e. running). Returns an exit code
602 0 if at least one is active, non-zero
604 <option>--quiet</option> is specified
605 this will also print the current unit
606 state to STDOUT.</para></listitem>
609 <term><command>is-failed [NAME...]</command></term>
611 <listitem><para>Check whether any of
612 the specified units are failed.
614 0 if at least one is failed, non-zero
616 <option>--quiet</option> is specified
617 this will also print the current unit
618 state to STDOUT.</para></listitem>
621 <term><command>status [NAME...|PID...]</command></term>
623 <listitem><para>Show terse runtime
624 status information about one or more
625 units, followed by most recent log
626 data from the journal. If no units are
627 specified, show all units (subject to
628 limitations specified with
629 <option>-t</option>). If a PID is
630 passed show information about the unit
631 the process belongs to.</para>
633 <para>This function is intended to
634 generate human-readable output. If you
635 are looking for computer-parsable
636 output, use <command>show</command>
637 instead.</para></listitem>
640 <term><command>show [NAME...|JOB...]</command></term>
642 <listitem><para>Show properties of one
643 or more units, jobs or the manager
644 itself. If no argument is specified
645 properties of the manager will be
646 shown. If a unit name is specified
647 properties of the unit is shown, and
648 if a job id is specified properties of
649 the job is shown. By default, empty
650 properties are suppressed. Use
651 <option>--all</option> to show those
652 too. To select specific properties to
654 <option>--property=</option>. This
655 command is intended to be used
656 whenever computer-parsable output is
658 <command>status</command> if you are
659 looking for formatted human-readable
660 output.</para></listitem>
663 <term><command>help [NAME...|PID...]</command></term>
665 <listitem><para>Show manual pages for
666 one or more units, if available. If a
667 PID is passed the manual pages for the
668 unit the process of the PID belongs to
669 is shown.</para></listitem>
672 <term><command>reset-failed [NAME...]</command></term>
674 <listitem><para>Reset the
675 '<literal>failed</literal>' state of the
676 specified units, or if no unit name is
677 passed of all units. When a unit fails
678 in some way (i.e. process exiting with
679 non-zero error code, terminating
680 abnormally or timing out) it will
681 automatically enter the
682 '<literal>failed</literal>' state and
683 its exit code and status is recorded
684 for introspection by the administrator
685 until the service is restarted or
687 command.</para></listitem>
691 <term><command>list-unit-files</command></term>
693 <listitem><para>List installed unit files.
698 <term><command>enable [NAME...]</command></term>
700 <listitem><para>Enable one or
701 more unit files or unit file
702 instances, as specified on the
703 command line. This will create a
704 number of symlinks as encoded in
705 the <literal>[Install]</literal>
706 sections of the unit files. After
707 the symlinks have been created the
708 systemd configuration is reloaded
709 (in a way that is equivalent to
710 <command>daemon-reload</command>)
711 to ensure the changes are taken into
712 account immediately. Note that this
713 does not have the effect that any of
714 the units enabled are also started at
715 the same time. If this is desired
716 a separate <command>start</command>
717 command must be invoked for the unit.
718 Also note that in case of instance
719 enablement, symlinks named same as
720 instances are created in install
721 location, however they all point to
722 the same template unit file.</para>
724 <para>This command will
725 print the actions executed. This
726 output may be suppressed by passing
727 <option>--quiet</option>.</para>
729 <para>Note that this operation creates
730 only the suggested symlinks for the
731 units. While this command is the
732 recommended way to manipulate the unit
733 configuration directory, the
734 administrator is free to make
735 additional changes manually, by
736 placing or removing symlinks in the
737 directory. This is particularly useful
738 to create configurations that deviate
739 from the suggested default
740 installation. In this case the
741 administrator must make sure to invoke
742 <command>daemon-reload</command>
743 manually as necessary, to ensure his
744 changes are taken into account.</para>
746 <para>Enabling units should not be
747 confused with starting (activating)
748 units, as done by the
749 <command>start</command>
750 command. Enabling and starting units
751 is orthogonal: units may be enabled
752 without being started and started
753 without being enabled. Enabling simply
754 hooks the unit into various suggested
755 places (for example, so that the unit
756 is automatically started on boot or
757 when a particular kind of hardware is
758 plugged in). Starting actually spawns
759 the daemon process (in case of service
760 units), or binds the socket (in case
761 of socket units), and so
764 <para>Depending on whether
765 <option>--system</option>,
766 <option>--user</option> or
767 <option>--global</option> is specified
768 this enables the unit for the system,
769 for the calling user only
770 or for all future logins of all
771 users. Note that in the latter case no
772 systemd daemon configuration is
778 <term><command>disable [NAME...]</command></term>
780 <listitem><para>Disables one or more
781 units. This removes all symlinks to
782 the specified unit files from the unit
783 configuration directory, and hence
784 undoes the changes made by
785 <command>enable</command>. Note
786 however that this removes
787 all symlinks to the unit files
788 (i.e. including manual additions), not
789 just those actually created by
790 <command>enable</command>. This call
791 implicitly reloads the systemd daemon
792 configuration after completing the
793 disabling of the units. Note that this
794 command does not implicitly stop the
795 units that are being disabled. If this
796 is desired an additional
797 <command>stop</command> command should
798 be executed afterwards.</para>
800 <para>This command will print the
801 actions executed. This output may be
802 suppressed by passing
803 <option>--quiet</option>.</para>
806 <para>This command honors
807 <option>--system</option>,
808 <option>--user</option>,
809 <option>--global</option> in a similar
811 <command>enable</command>.</para>
815 <term><command>is-enabled [NAME...]</command></term>
817 <listitem><para>Checks whether any of
818 the specified unit files are enabled
820 <command>enable</command>). Returns an
821 exit code of 0 if at least one is
822 enabled, non-zero otherwise. Prints
823 the current enable status. To suppress
825 <option>--quiet</option>.</para></listitem>
829 <term><command>reenable [NAME...]</command></term>
831 <listitem><para>Reenable one or more
832 unit files, as specified on the
833 command line. This is a combination of
834 <command>disable</command> and
835 <command>enable</command> and is
836 useful to reset the symlinks a unit is
837 enabled with to the defaults
839 <literal>[Install]</literal> section
840 of the unit file.</para>
845 <term><command>preset [NAME...]</command></term>
847 <listitem><para>Reset one or more unit
848 files, as specified on the command
849 line, to the defaults configured in
850 the preset policy files. This has the
852 <command>disable</command> or
853 <command>enable</command>, depending
854 how the unit is listed in the preset
855 files. For more information on preset
857 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For
858 more information on the concept of
859 presets please consult the <ulink
860 url="http://freedesktop.org/wiki/Software/systemd/Preset">Preset</ulink>
866 <term><command>mask [NAME...]</command></term>
868 <listitem><para>Mask one or more unit
869 files, as specified on the command
870 line. This will link these units to
871 <filename>/dev/null</filename>, making
872 it impossible to start them. This is a stronger version
873 of <command>disable</command>, since
874 it prohibits all kinds of activation
875 of the unit, including manual
876 activation. Use this option with
882 <term><command>unmask [NAME...]</command></term>
884 <listitem><para>Unmask one or more
885 unit files, as specified on the
886 command line. This will undo the
888 <command>mask</command>.</para>
893 <term><command>link [NAME...]</command></term>
895 <listitem><para>Link a unit file that
896 is not in the unit file search paths
897 into the unit file search path. This
898 requires an absolute path to a unit
899 file. The effect of this can be undone
900 with <command>disable</command>. The
901 effect of this command is that a unit
902 file is available for
903 <command>start</command> and other
904 commands although it isn't installed
905 directly in the unit search
911 <term><command>load [NAME...]</command></term>
913 <listitem><para>Load one or more units
914 specified on the command line. This
915 will simply load their configuration
916 from disk, but not start them. To
917 start them you need to use the
918 <command>start</command> command which
919 will implicitly load a unit that has
920 not been loaded yet. Note that systemd
921 garbage collects loaded units that are
922 not active or referenced by an active
923 unit. This means that units loaded
924 this way will usually not stay loaded
925 for long. Also note that this command
926 cannot be used to reload unit
927 configuration. Use the
928 <command>daemon-reload</command>
929 command for that. All in all, this
930 command is of little use except for
932 <para>This command should not be
934 <command>daemon-reload</command> or
935 <command>reload</command>
936 commands.</para></listitem>
939 <term><command>list-jobs</command></term>
941 <listitem><para>List jobs that are in progress.</para></listitem>
944 <term><command>cancel [JOB...]</command></term>
946 <listitem><para>Cancel one or more
947 jobs specified on the command line by
949 IDs. If no job id is specified, cancel all pending jobs.</para></listitem>
952 <term><command>dump</command></term>
954 <listitem><para>Dump server
955 status. This will output a (usually
956 very long) human readable manager
957 status dump. Its format is subject to
958 change without notice and should not
960 applications.</para></listitem>
963 <term><command>list-dependencies [NAME]</command></term>
965 <listitem><para> Shows required and
966 wanted units of the specified unit. If
968 <filename>default.target</filename> is
969 implied. Target units are recursively
970 expanded. When <option>--all</option>
971 is passed all other units aare
972 recursively expanded as well.</para>
976 <term><command>snapshot [NAME]</command></term>
978 <listitem><para>Create a snapshot. If
979 a snapshot name is specified, the new
980 snapshot will be named after it. If
981 none is specified an automatic
982 snapshot name is generated. In either
983 case, the snapshot name used is
984 printed to STDOUT, unless
985 <option>--quiet</option> is
988 <para>A snapshot refers to a saved
989 state of the systemd manager. It is
990 implemented itself as a unit that is
991 generated dynamically with this
992 command and has dependencies on all
993 units active at the time. At a later
994 time the user may return to this state
996 <command>isolate</command> command on
997 the snapshot unit.</para></listitem>
999 <para>Snapshots are only useful for
1000 saving and restoring which units are
1001 running or are stopped, they do not
1002 save/restore any other
1003 state. Snapshots are dynamic and lost
1007 <term><command>delete [NAME...]</command></term>
1009 <listitem><para>Remove a snapshot
1010 previously created with
1011 <command>snapshot</command>.</para></listitem>
1014 <term><command>daemon-reload</command></term>
1016 <listitem><para>Reload systemd manager
1017 configuration. This will reload all
1018 unit files and recreate the entire
1019 dependency tree. While the daemon is
1020 reloaded, all sockets systemd listens
1021 on on behalf of user configuration will
1022 stay accessible.</para> <para>This
1023 command should not be confused with
1024 the <command>load</command> or
1025 <command>reload</command>
1026 commands.</para></listitem>
1029 <term><command>daemon-reexec</command></term>
1031 <listitem><para>Reexecute the systemd
1032 manager. This will serialize the
1033 manager state, reexecute the process
1034 and deserialize the state again. This
1035 command is of little use except for
1036 debugging and package
1037 upgrades. Sometimes it might be
1038 helpful as a heavy-weight
1039 <command>daemon-reload</command>. While
1040 the daemon is reexecuted all sockets
1041 systemd listens on on behalf of user
1042 configuration will stay
1043 accessible.</para></listitem>
1046 <term><command>show-environment</command></term>
1048 <listitem><para>Dump the systemd
1049 manager environment block. The
1050 environment block will be dumped in
1051 straight-forward form suitable for
1052 sourcing into a shell script. This
1053 environment block will be passed to
1054 all processes the manager
1055 spawns.</para></listitem>
1058 <term><command>set-environment [NAME=VALUE...]</command></term>
1060 <listitem><para>Set one or more
1061 systemd manager environment variables,
1062 as specified on the command
1063 line.</para></listitem>
1066 <term><command>unset-environment [NAME...]</command></term>
1068 <listitem><para>Unset one or more
1069 systemd manager environment
1070 variables. If only a variable name is
1071 specified it will be removed
1072 regardless of its value. If a variable
1073 and a value are specified the variable
1074 is only removed if it has the
1075 specified value.</para></listitem>
1078 <term><command>default</command></term>
1080 <listitem><para>Enter default
1081 mode. This is mostly equivalent to
1083 default.target</command>.</para></listitem>
1086 <term><command>rescue</command></term>
1088 <listitem><para>Enter rescue
1089 mode. This is mostly equivalent to
1091 rescue.target</command> but also
1092 prints a wall message to all
1093 users.</para></listitem>
1096 <term><command>emergency</command></term>
1098 <listitem><para>Enter emergency
1099 mode. This is mostly equivalent to
1101 emergency.target</command> but also
1102 prints a wall message to all
1103 users.</para></listitem>
1106 <term><command>halt</command></term>
1108 <listitem><para>Shut down and halt the
1109 system. This is mostly equivalent to
1110 <command>start halt.target</command>
1111 but also prints a wall message to all
1112 users. If combined with
1113 <option>--force</option> shutdown of
1114 all running services is skipped,
1115 however all processes are killed and
1116 all file systems are unmounted or
1117 mounted read-only, immediately
1118 followed by the system halt. If
1119 <option>--force</option> is specified
1120 twice the operation is immediately
1121 executed without terminating any
1122 processes or unmounting any file
1123 systems. This may result in data
1124 loss.</para></listitem>
1127 <term><command>poweroff</command></term>
1129 <listitem><para>Shut down and
1130 power-off the system. This is mostly
1131 equivalent to <command>start
1132 poweroff.target</command> but also
1133 prints a wall message to all users. If
1134 combined with <option>--force</option>
1135 shutdown of all running services is
1136 skipped, however all processes are
1137 killed and all file systems are
1138 unmounted or mounted read-only,
1139 immediately followed by the powering
1140 off. If <option>--force</option> is
1141 specified twice the operation is
1142 immediately executed without
1143 terminating any processes or
1144 unmounting any file systems. This may
1145 result in data loss.</para></listitem>
1148 <term><command>reboot</command></term>
1150 <listitem><para>Shut down and reboot
1151 the system. This is mostly equivalent
1153 reboot.target</command> but also
1154 prints a wall message to all users. If
1155 combined with <option>--force</option>
1156 shutdown of all running services is
1157 skipped, however all processes are
1158 killed and all file systems are
1159 unmounted or mounted read-only,
1160 immediately followed by the reboot. If
1161 <option>--force</option> is specified
1162 twice the operation is immediately
1163 executed without terminating any
1164 processes or unmounting any file
1165 systems. This may result in data
1166 loss.</para></listitem>
1169 <term><command>kexec</command></term>
1171 <listitem><para>Shut down and reboot
1172 the system via kexec. This is mostly
1173 equivalent to <command>start
1174 kexec.target</command> but also prints
1175 a wall message to all users. If
1176 combined with <option>--force</option>
1177 shutdown of all running services is
1178 skipped, however all processes are killed
1179 and all file systems are unmounted or
1180 mounted read-only, immediately
1182 reboot.</para></listitem>
1185 <term><command>exit</command></term>
1187 <listitem><para>Ask the systemd
1188 manager to quit. This is only
1189 supported for user service managers
1190 (i.e. in conjunction with the
1191 <option>--user</option> option) and
1192 will fail otherwise.</para></listitem>
1195 <term><command>suspend</command></term>
1197 <listitem><para>Suspend the
1198 system. This will trigger activation
1200 <filename>suspend.target</filename>
1201 target.</para></listitem>
1204 <term><command>hibernate</command></term>
1206 <listitem><para>Hibernate the
1207 system. This will trigger activation
1209 <filename>hibernate.target</filename>
1210 target.</para></listitem>
1213 <term><command>hybrid-sleep</command></term>
1215 <listitem><para>Hibernate and suspend
1216 the system. This will trigger
1217 activation of the special
1218 <filename>hybrid-sleep.target</filename>
1219 target.</para></listitem>
1222 <term><command>switch-root [ROOT] [INIT]</command></term>
1224 <listitem><para>Switches to a
1225 different root directory and executes
1226 a new system manager process below
1227 it. This is intended for usage in
1228 initial RAM disks ("initrd"), and will
1229 transition from the initrd's system
1230 manager process (a.k.a "init" process)
1231 to the main system manager
1232 process. Takes two arguments: the
1233 directory to make the new root
1234 directory, and the path to the new
1235 system manager binary below it to
1236 execute as PID 1. If the latter is
1237 omitted or the empty string, a
1238 systemd binary will automatically be
1239 searched for and used as init. If the
1240 system manager path is omitted or
1241 equal the empty string the state of
1242 the initrd's system manager process is
1243 passed to the main system manager,
1244 which allows later introspection of the
1245 state of the services involved in the
1246 initrd boot.</para></listitem>
1253 <title>Exit status</title>
1255 <para>On success 0 is returned, a non-zero failure
1256 code otherwise.</para>
1260 <title>Environment</title>
1262 <variablelist class='environment-variables'>
1264 <term><varname>$SYSTEMD_PAGER</varname></term>
1265 <listitem><para>Pager to use when
1266 <option>--no-pager</option> is not given;
1267 overrides <varname>$PAGER</varname>. Setting
1268 this to an empty string or the value
1269 <literal>cat</literal> is equivalent to passing
1270 <option>--no-pager</option>.</para></listitem>
1276 <title>See Also</title>
1278 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1279 <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1280 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1281 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1282 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1283 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1284 <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1285 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>