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>enable</command> and
202 <command>disable</command>.</para></listitem>
206 <term><option>--no-block</option></term>
208 <listitem><para>Do not synchronously wait for
209 the requested operation to finish. If this is
210 not specified the job will be verified,
211 enqueued and <command>systemctl</command> will
212 wait until it is completed. By passing this
213 argument it is only verified and
214 enqueued.</para></listitem>
218 <term><option>--no-legend</option></term>
220 <listitem><para>Do not print a legend, i.e.
221 the column headers and the footer with hints.
226 <term><option>--no-pager</option></term>
228 <listitem><para>Do not pipe output into a
229 pager.</para></listitem>
233 <term><option>--system</option></term>
235 <listitem><para>Talk to the systemd
236 system manager. (Default)</para></listitem>
240 <term><option>--user</option></term>
242 <listitem><para>Talk to the systemd
243 manager of the calling user.</para></listitem>
247 <term><option>--order</option></term>
248 <term><option>--require</option></term>
250 <listitem><para>When used in
252 <command>dot</command> command (see
253 below), selects which dependencies are
254 shown in the dependency graph. If
255 <option>--order</option> is passed
256 only dependencies of type
257 <varname>After=</varname> or
258 <varname>Before=</varname> are
259 shown. If <option>--require</option>
260 is passed only dependencies of type
261 <varname>Requires=</varname>,
262 <varname>RequiresOverridable=</varname>,
263 <varname>Requisite=</varname>,
264 <varname>RequisiteOverridable=</varname>,
265 <varname>Wants=</varname> and
266 <varname>Conflicts=</varname> are
267 shown. If neither is passed, shows
268 dependencies of all these
269 types.</para></listitem>
273 <term><option>--no-wall</option></term>
275 <listitem><para>Don't send wall
277 halt, power-off, reboot.</para></listitem>
281 <term><option>--global</option></term>
283 <listitem><para>When used with
284 <command>enable</command> and
285 <command>disable</command>, operate on the
286 global user configuration
287 directory, thus enabling or disabling
288 a unit file globally for all future
289 logins of all users.</para></listitem>
293 <term><option>--no-reload</option></term>
295 <listitem><para>When used with
296 <command>enable</command> and
297 <command>disable</command>, do not
298 implicitly reload daemon configuration
300 changes.</para></listitem>
304 <term><option>--no-ask-password</option></term>
306 <listitem><para>When used with
307 <command>start</command> and related
308 commands, disables asking for
309 passwords. Background services may
310 require input of a password or
311 passphrase string, for example to
312 unlock system hard disks or
313 cryptographic certificates. Unless
314 this option is specified and the
315 command is invoked from a terminal
316 <command>systemctl</command> will
317 query the user on the terminal for the
318 necessary secrets. Use this option to
319 switch this behavior off. In this case
320 the password must be supplied by some
321 other means (for example graphical
322 password agents) or the service might
323 fail. This also disables querying the
324 user for authentication for privileged
325 operations.</para></listitem>
329 <term><option>--kill-who=</option></term>
331 <listitem><para>When used with
332 <command>kill</command>, choose which
333 processes to kill. Must be one of
334 <option>main</option>,
335 <option>control</option> or
336 <option>all</option> to select whether
337 to kill only the main process of the
338 unit, the control process or all
339 processes of the unit. If omitted
341 <option>all</option>.</para></listitem>
345 <term><option>--signal=</option></term>
346 <term><option>-s</option></term>
348 <listitem><para>When used with
349 <command>kill</command>, choose which
350 signal to send to selected
351 processes. Must be one of the well
352 known signal specifiers such as
353 SIGTERM, SIGINT or SIGSTOP. If
355 <option>SIGTERM</option>.</para></listitem>
359 <term><option>--force</option></term>
360 <term><option>-f</option></term>
362 <listitem><para>When used with
363 <command>enable</command>, overwrite any
365 symlinks.</para></listitem>
367 <listitem><para>When used with
368 <command>halt</command>,
369 <command>poweroff</command>,
370 <command>reboot</command> or
371 <command>kexec</command> execute the
372 selected operation without shutting
373 down all units. However, all processes
374 will be killed forcibly and all file
375 systems are unmounted or remounted
376 read-only. This is hence a drastic but
377 relatively safe option to request an
379 <option>--force</option> is specified
380 twice for these operations, they will
381 be executed immediately without
382 terminating any processes or umounting
383 any file systems. Warning: specifying
384 <option>--force</option> twice with
385 any of these operations might result
386 in data loss.</para></listitem>
390 <term><option>--root=</option></term>
392 <listitem><para>When used with
393 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and
394 related commands), use alternative
395 root path when looking for unit
396 files.</para></listitem>
400 <term><option>--runtime</option></term>
402 <listitem><para>When used with
403 <command>enable</command>/<command>disable</command>/<command>is-enabled</command> (and related commands), make
404 changes only temporarily, so that they
405 are dropped on the next reboot. This
406 will have the effect that changes are
407 not made in subdirectories of
408 <filename>/etc</filename> but in
409 <filename>/run</filename>, with
410 identical immediate effects, however,
411 since the latter is lost on reboot,
413 too.</para></listitem>
417 <term><option>-H</option></term>
418 <term><option>--host</option></term>
420 <listitem><para>Execute operation
421 remotely. Specify a hostname, or
422 username and hostname separated by @,
423 to connect to. This will use SSH to
424 talk to the remote systemd
425 instance.</para></listitem>
429 <term><option>-P</option></term>
430 <term><option>--privileged</option></term>
432 <listitem><para>Acquire privileges via
433 PolicyKit before executing the
434 operation.</para></listitem>
438 <term><option>--lines=</option></term>
439 <term><option>-n</option></term>
441 <listitem><para>When used with
442 <command>status</command> controls the
443 number of journal lines to show,
444 counting from the most recent
445 ones. Takes a positive integer
446 argument. Defaults to
447 10.</para></listitem>
451 <term><option>--output=</option></term>
452 <term><option>-o</option></term>
454 <listitem><para>When used with
455 <command>status</command> controls the
456 formatting of the journal entries that
457 are shown. For the available choices
459 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>. Defaults
461 <literal>short</literal>.</para></listitem>
466 <para>The following commands are understood:</para>
470 <term><command>list-units</command></term>
472 <listitem><para>List known units.</para></listitem>
475 <term><command>start [NAME...]</command></term>
477 <listitem><para>Start (activate) one
478 or more units specified on the command
479 line.</para></listitem>
482 <term><command>stop [NAME...]</command></term>
484 <listitem><para>Stop (deactivate) one
485 or more units specified on the command
486 line.</para></listitem>
489 <term><command>reload [NAME...]</command></term>
491 <listitem><para>Asks all units listed
492 on the command line to reload their
493 configuration. Note that this will
494 reload the service-specific
495 configuration, not the unit
496 configuration file of systemd. If you
497 want systemd to reload the
498 configuration file of a unit use the
499 <command>daemon-reload</command>
500 command. In other words: for the
501 example case of Apache, this will
503 <filename>httpd.conf</filename> in the
505 <filename>apache.service</filename>
506 systemd unit file. </para>
508 <para>This command should not be
510 <command>daemon-reload</command> or
511 <command>load</command>
512 commands.</para></listitem>
516 <term><command>restart [NAME...]</command></term>
518 <listitem><para>Restart one or more
519 units specified on the command
520 line. If the units are not running yet
522 started.</para></listitem>
525 <term><command>try-restart [NAME...]</command></term>
527 <listitem><para>Restart one or more
528 units specified on the command
529 line if the units are running. Do
530 nothing if units are not running.
531 Note that for compatibility
532 with Red Hat init scripts
533 <command>condrestart</command> is
534 equivalent to this command.</para></listitem>
537 <term><command>reload-or-restart [NAME...]</command></term>
539 <listitem><para>Reload one or more
540 units if they support it. If not,
541 restart them instead. If the units
542 are not running yet they will be
543 started.</para></listitem>
546 <term><command>reload-or-try-restart [NAME...]</command></term>
548 <listitem><para>Reload one or more
549 units if they support it. If not,
550 restart them instead. Do nothing if
551 the units are not running. Note that
552 for compatibility with SysV init
554 <command>force-reload</command> is
556 command.</para></listitem>
559 <term><command>isolate [NAME]</command></term>
561 <listitem><para>Start the unit
562 specified on the command line and its
563 dependencies and stop all others.</para>
565 <para>This is similar to changing the
566 runlevel in a traditional init system. The
567 <command>isolate</command> command will
568 immediately stop processes that are not
569 enabled in the new unit, possibly including
570 the graphical environment or terminal you
571 are currently using.</para>
573 <para>Note that this works only on units
574 where <option>AllowIsolate=</option> is
576 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
577 for details.</para></listitem>
580 <term><command>kill [NAME...]</command></term>
582 <listitem><para>Send a signal to one
583 or more processes of the unit. Use
584 <option>--kill-who=</option> to select
585 which process to kill. Use
586 <option>--kill-mode=</option> to
587 select the kill mode and
588 <option>--signal=</option> to select
589 the signal to send.</para></listitem>
592 <term><command>is-active [NAME...]</command></term>
594 <listitem><para>Check whether any of
595 the specified units are active
596 (i.e. running). Returns an exit code
597 0 if at least one is active, non-zero
599 <option>--quiet</option> is specified
600 this will also print the current unit
601 state to STDOUT.</para></listitem>
604 <term><command>status [NAME...|PID...]</command></term>
606 <listitem><para>Show terse runtime
607 status information about one or more
608 units, followed by its most recent log
609 data from the journal. This function
610 is intended to generate human-readable
611 output. If you are looking for
612 computer-parsable output, use
613 <command>show</command> instead. If a
614 PID is passed information about the
615 unit the process of the PID belongs to
616 is shown.</para></listitem>
619 <term><command>show [NAME...|JOB...]</command></term>
621 <listitem><para>Show properties of one
622 or more units, jobs or the manager
623 itself. If no argument is specified
624 properties of the manager will be
625 shown. If a unit name is specified
626 properties of the unit is shown, and
627 if a job id is specified properties of
628 the job is shown. By default, empty
629 properties are suppressed. Use
630 <option>--all</option> to show those
631 too. To select specific properties to
633 <option>--property=</option>. This
634 command is intended to be used
635 whenever computer-parsable output is
637 <command>status</command> if you are
638 looking for formatted human-readable
639 output.</para></listitem>
642 <term><command>help [NAME...|PID...]</command></term>
644 <listitem><para>Show manual pages for
645 one or more units, if available. If a
646 PID is passed the manual pages for the
647 unit the process of the PID belongs to
648 is shown.</para></listitem>
651 <term><command>reset-failed [NAME...]</command></term>
653 <listitem><para>Reset the
654 '<literal>failed</literal>' state of the
655 specified units, or if no unit name is
656 passed of all units. When a unit fails
657 in some way (i.e. process exiting with
658 non-zero error code, terminating
659 abnormally or timing out) it will
660 automatically enter the
661 '<literal>failed</literal>' state and
662 its exit code and status is recorded
663 for introspection by the administrator
664 until the service is restarted or
666 command.</para></listitem>
670 <term><command>list-unit-files</command></term>
672 <listitem><para>List installed unit files.
677 <term><command>enable [NAME...]</command></term>
679 <listitem><para>Enable one or
680 more unit files or unit file
681 instances, as specified on the
682 command line. This will create a
683 number of symlinks as encoded in
684 the <literal>[Install]</literal>
685 sections of the unit files. After
686 the symlinks have been created the
687 systemd configuration is reloaded
688 (in a way that is equivalent to
689 <command>daemon-reload</command>)
690 to ensure the changes are taken into
691 account immediately. Note that this
692 does not have the effect that any of
693 the units enabled are also started at
694 the same time. If this is desired
695 a separate <command>start</command>
696 command must be invoked for the unit.
697 Also note that in case of instance
698 enablement, symlinks named same as
699 instances are created in install
700 location, however they all point to
701 the same template unit file.</para>
703 <para>This command will
704 print the actions executed. This
705 output may be suppressed by passing
706 <option>--quiet</option>.</para>
708 <para>Note that this operation creates
709 only the suggested symlinks for the
710 units. While this command is the
711 recommended way to manipulate the unit
712 configuration directory, the
713 administrator is free to make
714 additional changes manually, by
715 placing or removing symlinks in the
716 directory. This is particularly useful
717 to create configurations that deviate
718 from the suggested default
719 installation. In this case the
720 administrator must make sure to invoke
721 <command>daemon-reload</command>
722 manually as necessary, to ensure his
723 changes are taken into account.</para>
725 <para>Enabling units should not be
726 confused with starting (activating)
727 units, as done by the
728 <command>start</command>
729 command. Enabling and starting units
730 is orthogonal: units may be enabled
731 without being started and started
732 without being enabled. Enabling simply
733 hooks the unit into various suggested
734 places (for example, so that the unit
735 is automatically started on boot or
736 when a particular kind of hardware is
737 plugged in). Starting actually spawns
738 the daemon process (in case of service
739 units), or binds the socket (in case
740 of socket units), and so
743 <para>Depending on whether
744 <option>--system</option>,
745 <option>--user</option> or
746 <option>--global</option> is specified
747 this enables the unit for the system,
748 for the calling user only
749 or for all future logins of all
750 users. Note that in the latter case no
751 systemd daemon configuration is
757 <term><command>disable [NAME...]</command></term>
759 <listitem><para>Disables one or more
760 units. This removes all symlinks to
761 the specified unit files from the unit
762 configuration directory, and hence
763 undoes the changes made by
764 <command>enable</command>. Note
765 however that this removes
766 all symlinks to the unit files
767 (i.e. including manual additions), not
768 just those actually created by
769 <command>enable</command>. This call
770 implicitly reloads the systemd daemon
771 configuration after completing the
772 disabling of the units. Note that this
773 command does not implicitly stop the
774 units that are being disabled. If this
775 is desired an additional
776 <command>stop</command> command should
777 be executed afterwards.</para>
779 <para>This command will print the
780 actions executed. This output may be
781 suppressed by passing
782 <option>--quiet</option>.</para>
785 <para>This command honors
786 <option>--system</option>,
787 <option>--user</option>,
788 <option>--global</option> in a similar
790 <command>enable</command>.</para>
794 <term><command>is-enabled [NAME...]</command></term>
796 <listitem><para>Checks whether any of
797 the specified unit files are enabled
799 <command>enable</command>). Returns an
800 exit code of 0 if at least one is
801 enabled, non-zero otherwise. Prints
802 the current enable status. To suppress
804 <option>--quiet</option>.</para></listitem>
808 <term><command>reenable [NAME...]</command></term>
810 <listitem><para>Reenable one or more
811 unit files, as specified on the
812 command line. This is a combination of
813 <command>disable</command> and
814 <command>enable</command> and is
815 useful to reset the symlinks a unit is
816 enabled with to the defaults
818 <literal>[Install]</literal> section
819 of the unit file.</para>
824 <term><command>preset [NAME...]</command></term>
826 <listitem><para>Reset one or more unit
827 files, as specified on the command
828 line, to the defaults configured in
829 the preset policy files. This has the
831 <command>disable</command> or
832 <command>enable</command>, depending
833 how the unit is listed in the preset
834 files. For more information on preset
836 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For
837 more information on the concept of
838 presets please consult the <ulink
839 url="http://freedesktop.org/wiki/Software/systemd/Preset">Preset</ulink>
845 <term><command>mask [NAME...]</command></term>
847 <listitem><para>Mask one or more unit
848 files, as specified on the command
849 line. This will link these units to
850 <filename>/dev/null</filename>, making
851 it impossible to start them. This is a stronger version
852 of <command>disable</command>, since
853 it prohibits all kinds of activation
854 of the unit, including manual
855 activation. Use this option with
861 <term><command>unmask [NAME...]</command></term>
863 <listitem><para>Unmask one or more
864 unit files, as specified on the
865 command line. This will undo the
867 <command>mask</command>.</para>
872 <term><command>link [NAME...]</command></term>
874 <listitem><para>Link a unit file that
875 is not in the unit file search paths
876 into the unit file search path. This
877 requires an absolute path to a unit
878 file. The effect of this can be undone
879 with <command>disable</command>. The
880 effect of this command is that a unit
881 file is available for
882 <command>start</command> and other
883 commands although it isn't installed
884 directly in the unit search
890 <term><command>load [NAME...]</command></term>
892 <listitem><para>Load one or more units
893 specified on the command line. This
894 will simply load their configuration
895 from disk, but not start them. To
896 start them you need to use the
897 <command>start</command> command which
898 will implicitly load a unit that has
899 not been loaded yet. Note that systemd
900 garbage collects loaded units that are
901 not active or referenced by an active
902 unit. This means that units loaded
903 this way will usually not stay loaded
904 for long. Also note that this command
905 cannot be used to reload unit
906 configuration. Use the
907 <command>daemon-reload</command>
908 command for that. All in all, this
909 command is of little use except for
911 <para>This command should not be
913 <command>daemon-reload</command> or
914 <command>reload</command>
915 commands.</para></listitem>
918 <term><command>list-jobs</command></term>
920 <listitem><para>List jobs that are in progress.</para></listitem>
923 <term><command>cancel [JOB...]</command></term>
925 <listitem><para>Cancel one or more
926 jobs specified on the command line by
928 IDs. If no job id is specified, cancel all pending jobs.</para></listitem>
931 <term><command>dump</command></term>
933 <listitem><para>Dump server
934 status. This will output a (usually
935 very long) human readable manager
936 status dump. Its format is subject to
937 change without notice and should not
939 applications.</para></listitem>
942 <term><command>dot</command></term>
944 <listitem><para>Generate textual
945 dependency graph description in dot
946 format for further processing with the
948 <citerefentry><refentrytitle>dot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
949 tool. Use a command line like
950 <command>systemctl dot | dot -Tsvg >
951 systemd.svg</command> to generate a
952 graphical dependency tree. Unless
953 <option>--order</option> or
954 <option>--require</option> is passed
955 the generated graph will show both
956 ordering and requirement
957 dependencies.</para></listitem>
960 <term><command>snapshot [NAME]</command></term>
962 <listitem><para>Create a snapshot. If
963 a snapshot name is specified, the new
964 snapshot will be named after it. If
965 none is specified an automatic
966 snapshot name is generated. In either
967 case, the snapshot name used is
968 printed to STDOUT, unless
969 <option>--quiet</option> is
972 <para>A snapshot refers to a saved
973 state of the systemd manager. It is
974 implemented itself as a unit that is
975 generated dynamically with this
976 command and has dependencies on all
977 units active at the time. At a later
978 time the user may return to this state
980 <command>isolate</command> command on
981 the snapshot unit.</para></listitem>
983 <para>Snapshots are only useful for
984 saving and restoring which units are
985 running or are stopped, they do not
986 save/restore any other
987 state. Snapshots are dynamic and lost
991 <term><command>delete [NAME...]</command></term>
993 <listitem><para>Remove a snapshot
994 previously created with
995 <command>snapshot</command>.</para></listitem>
998 <term><command>daemon-reload</command></term>
1000 <listitem><para>Reload systemd manager
1001 configuration. This will reload all
1002 unit files and recreate the entire
1003 dependency tree. While the daemon is
1004 reloaded, all sockets systemd listens
1005 on on behalf of user configuration will
1006 stay accessible.</para> <para>This
1007 command should not be confused with
1008 the <command>load</command> or
1009 <command>reload</command>
1010 commands.</para></listitem>
1013 <term><command>daemon-reexec</command></term>
1015 <listitem><para>Reexecute the systemd
1016 manager. This will serialize the
1017 manager state, reexecute the process
1018 and deserialize the state again. This
1019 command is of little use except for
1020 debugging and package
1021 upgrades. Sometimes it might be
1022 helpful as a heavy-weight
1023 <command>daemon-reload</command>. While
1024 the daemon is reexecuted all sockets
1025 systemd listens on on behalf of user
1026 configuration will stay
1027 accessible.</para></listitem>
1030 <term><command>show-environment</command></term>
1032 <listitem><para>Dump the systemd
1033 manager environment block. The
1034 environment block will be dumped in
1035 straight-forward form suitable for
1036 sourcing into a shell script. This
1037 environment block will be passed to
1038 all processes the manager
1039 spawns.</para></listitem>
1042 <term><command>set-environment [NAME=VALUE...]</command></term>
1044 <listitem><para>Set one or more
1045 systemd manager environment variables,
1046 as specified on the command
1047 line.</para></listitem>
1050 <term><command>unset-environment [NAME...]</command></term>
1052 <listitem><para>Unset one or more
1053 systemd manager environment
1054 variables. If only a variable name is
1055 specified it will be removed
1056 regardless of its value. If a variable
1057 and a value are specified the variable
1058 is only removed if it has the
1059 specified value.</para></listitem>
1062 <term><command>default</command></term>
1064 <listitem><para>Enter default
1065 mode. This is mostly equivalent to
1067 default.target</command>.</para></listitem>
1070 <term><command>rescue</command></term>
1072 <listitem><para>Enter rescue
1073 mode. This is mostly equivalent to
1075 rescue.target</command> but also
1076 prints a wall message to all
1077 users.</para></listitem>
1080 <term><command>emergency</command></term>
1082 <listitem><para>Enter emergency
1083 mode. This is mostly equivalent to
1085 emergency.target</command> but also
1086 prints a wall message to all
1087 users.</para></listitem>
1090 <term><command>halt</command></term>
1092 <listitem><para>Shut down and halt the
1093 system. This is mostly equivalent to
1094 <command>start halt.target</command>
1095 but also prints a wall message to all
1096 users. If combined with
1097 <option>--force</option> shutdown of
1098 all running services is skipped,
1099 however all processes are killed and
1100 all file systems are unmounted or
1101 mounted read-only, immediately
1102 followed by the system halt. If
1103 <option>--force</option> is specified
1104 twice the operation is immediately
1105 executed without terminating any
1106 processes or unmounting any file
1107 systems. This may result in data
1108 loss.</para></listitem>
1111 <term><command>poweroff</command></term>
1113 <listitem><para>Shut down and
1114 power-off the system. This is mostly
1115 equivalent to <command>start
1116 poweroff.target</command> but also
1117 prints a wall message to all users. If
1118 combined with <option>--force</option>
1119 shutdown of all running services is
1120 skipped, however all processes are
1121 killed and all file systems are
1122 unmounted or mounted read-only,
1123 immediately followed by the powering
1124 off. If <option>--force</option> is
1125 specified twice the operation is
1126 immediately executed without
1127 terminating any processes or
1128 unmounting any file systems. This may
1129 result in data loss.</para></listitem>
1132 <term><command>reboot</command></term>
1134 <listitem><para>Shut down and reboot
1135 the system. This is mostly equivalent
1137 reboot.target</command> but also
1138 prints a wall message to all users. If
1139 combined with <option>--force</option>
1140 shutdown of all running services is
1141 skipped, however all processes are
1142 killed and all file systems are
1143 unmounted or mounted read-only,
1144 immediately followed by the reboot. If
1145 <option>--force</option> is specified
1146 twice the operation is immediately
1147 executed without terminating any
1148 processes or unmounting any file
1149 systems. This may result in data
1150 loss.</para></listitem>
1153 <term><command>kexec</command></term>
1155 <listitem><para>Shut down and reboot
1156 the system via kexec. This is mostly
1157 equivalent to <command>start
1158 kexec.target</command> but also prints
1159 a wall message to all users. If
1160 combined with <option>--force</option>
1161 shutdown of all running services is
1162 skipped, however all processes are killed
1163 and all file systems are unmounted or
1164 mounted read-only, immediately
1166 reboot.</para></listitem>
1169 <term><command>exit</command></term>
1171 <listitem><para>Ask the systemd
1172 manager to quit. This is only
1173 supported for user service managers
1174 (i.e. in conjunction with the
1175 <option>--user</option> option) and
1176 will fail otherwise.</para></listitem>
1179 <term><command>suspend</command></term>
1181 <listitem><para>Suspend the
1182 system. This will trigger activation
1184 <filename>suspend.target</filename>
1185 target.</para></listitem>
1188 <term><command>hibernate</command></term>
1190 <listitem><para>Hibernate the
1191 system. This will trigger activation
1193 <filename>hibernate.target</filename>
1194 target.</para></listitem>
1197 <term><command>hybrid-sleep</command></term>
1199 <listitem><para>Hibernate and suspend
1200 the system. This will trigger
1201 activation of the special
1202 <filename>hybrid-sleep.target</filename>
1203 target.</para></listitem>
1206 <term><command>switch-root [ROOT] [INIT]</command></term>
1208 <listitem><para>Switches to a
1209 different root directory and executes
1210 a new system manager process below
1211 it. This is intended for usage in
1212 initial RAM disks ("initrd"), and will
1213 transition from the initrd's system
1214 manager process (a.k.a "init" process)
1215 to the main system manager
1216 process. Takes two arguments: the
1217 directory to make the new root
1218 directory, and the path to the new
1219 system manager binary below it to
1220 execute as PID 1. If the latter is
1221 omitted or the empty string, a
1222 systemd binary will automatically be
1223 searched for and used as init. If the
1224 system manager path is omitted or
1225 equal the empty string the state of
1226 the initrd's system manager process is
1227 passed to the main system manager,
1228 which allows later introspection of the
1229 state of the services involved in the
1230 initrd boot.</para></listitem>
1237 <title>Exit status</title>
1239 <para>On success 0 is returned, a non-zero failure
1240 code otherwise.</para>
1244 <title>Environment</title>
1248 <term><varname>$SYSTEMD_PAGER</varname></term>
1249 <listitem><para>Pager to use when
1250 <option>--no-pager</option> is not given;
1251 overrides <varname>$PAGER</varname>. Setting
1252 this to an empty string or the value
1253 <literal>cat</literal> is equivalent to passing
1254 <option>--no-pager</option>.</para></listitem>
1260 <title>See Also</title>
1262 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1263 <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1264 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1265 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1266 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1267 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1268 <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1269 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>