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</command>
53 <arg choice="opt" rep="repeat">OPTIONS</arg>
54 <arg choice="plain">COMMAND</arg>
55 <arg choice="opt" rep="repeat">NAME</arg>
60 <title>Description</title>
62 <para><command>systemctl</command> may be used to
63 introspect and control the state of the
64 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
65 system and service manager.</para>
69 <title>Options</title>
71 <para>The following options are understood:</para>
75 <term><option>-h</option></term>
76 <term><option>--help</option></term>
78 <listitem><para>Prints a short help
79 text and exits.</para></listitem>
83 <term><option>--version</option></term>
86 <para>Prints a short version string and exits.</para>
91 <term><option>-t</option></term>
92 <term><option>--type=</option></term>
95 <para>The argument should be a unit type name such as
96 <option>service</option> and <option>socket</option>, or a
97 unit load state such as <option>loaded</option> and
98 <option>masked</option>.
101 <para>If the argument is a unit type, when listing units,
102 limit display to certain unit types. If not specified units
103 of all types will be shown.</para>
105 <para>If the argument is a unit load state, when listing
106 units, limit display to certain unit types. If not specified
107 units of in all load states will be shown.</para>
109 <para>As a special case, if the argument is
110 <option>help</option>, a list of allowed values will be
111 printed and the program will exit.</para>
116 <term><option>-p</option></term>
117 <term><option>--property=</option></term>
120 <para>When showing unit/job/manager properties, limit
121 display to certain properties as specified as argument. If
122 not specified all set properties are shown. The argument
123 should be a comma-seperated list of property names, such as
124 <literal>MainPID</literal>. If specified more than once all
125 properties with the specified names are shown.</para>
130 <term><option>-a</option></term>
131 <term><option>--all</option></term>
134 <para>When listing units, show all units, regardless of
135 their state, including inactive units. When showing
136 unit/job/manager properties, show all properties regardless
137 whether they are set or not.</para>
142 <term><option>--failed</option></term>
145 <para>When listing units, show only failed units. Do not
146 confuse with <option>--fail</option>.</para>
151 <term><option>--full</option></term>
154 <para>Do not ellipsize unit names, cgroup members, and
155 truncate unit descriptions in the output of
156 <command>list-units</command> and
157 <command>list-jobs</command>.</para>
162 <term><option>--fail</option></term>
165 <para>If the requested operation conflicts with a pending
166 unfinished job, fail the command. If this is not specified
167 the requested operation will replace the pending job, if
168 necessary. Do not confuse with
169 <option>--failed</option>.</para>
174 <term><option>--ignore-dependencies</option></term>
177 <para>When enqueuing a new job ignore all its dependencies
178 and execute it immediately. If passed no required units of
179 the unit passed will be pulled in, and no ordering
180 dependencies will be honored. This is mostly a debugging and
181 rescue tool for the administrator and should not be used by
187 <term><option>-i</option></term>
188 <term><option>--ignore-inhibitors</option></term>
191 <para>When system shutdown or a sleep state is requested,
192 ignore inhibitor locks. Applications can establish inhibitor
193 locks to avoid that certain important operations (such as CD
194 burning or suchlike) are interrupted by system shutdown or a
195 sleep state. Any user may take these locks and privileged
196 users may override these locks. If any locks are taken,
197 shutdown and sleep state requests will normally fail
198 (regardless if privileged or not) and list of active locks
199 is printed. However if <option>--ignore-inhibitors</option>
200 is specified the locks are ignored and not printed, and the
201 operation attempted anyway, possibly requiring additional
207 <term><option>-q</option></term>
208 <term><option>--quiet</option></term>
211 <para>Suppress output to standard output in
212 <command>snapshot</command>,
213 <command>is-active</command>,
214 <command>is-failed</command>,
215 <command>enable</command> and
216 <command>disable</command>.</para>
221 <term><option>--no-block</option></term>
224 <para>Do not synchronously wait for the requested operation
225 to finish. If this is not specified the job will be
226 verified, enqueued and <command>systemctl</command> will
227 wait until it is completed. By passing this argument it is
228 only verified and enqueued.</para>
233 <term><option>--no-legend</option></term>
236 <para>Do not print a legend, i.e. the column headers and
237 the footer with hints.</para>
242 <term><option>--no-pager</option></term>
245 <para>Do not pipe output into a pager.</para>
250 <term><option>--system</option></term>
253 <para>Talk to the systemd system manager. (Default)</para>
258 <term><option>--user</option></term>
261 <para>Talk to the systemd manager of the calling
267 <term><option>--no-wall</option></term>
270 <para>Don't send wall message before halt, power-off,
276 <term><option>--global</option></term>
279 <para>When used with <command>enable</command> and
280 <command>disable</command>, operate on the global user
281 configuration directory, thus enabling or disabling a unit
282 file globally for all future logins of all users.</para>
287 <term><option>--no-reload</option></term>
290 <para>When used with <command>enable</command> and
291 <command>disable</command>, do not implicitly reload daemon
292 configuration after executing the changes.</para>
297 <term><option>--no-ask-password</option></term>
300 <para>When used with <command>start</command> and related
301 commands, disables asking for passwords. Background services
302 may require input of a password or passphrase string, for
303 example to unlock system hard disks or cryptographic
304 certificates. Unless this option is specified and the
305 command is invoked from a terminal
306 <command>systemctl</command> will query the user on the
307 terminal for the necessary secrets. Use this option to
308 switch this behavior off. In this case the password must be
309 supplied by some other means (for example graphical password
310 agents) or the service might fail. This also disables
311 querying the user for authentication for privileged
318 <term><option>--kill-who=</option></term>
321 <para>When used with <command>kill</command>, choose which
322 processes to kill. Must be one of <option>main</option>,
323 <option>control</option> or <option>all</option> to select
324 whether to kill only the main process of the unit, the
325 control process or all processes of the unit. If omitted
326 defaults to <option>all</option>.</para>
332 <term><option>-s</option></term>
333 <term><option>--signal=</option></term>
336 <para>When used with <command>kill</command>, choose which
337 signal to send to selected processes. Must be one of the
338 well known signal specifiers such as SIGTERM, SIGINT or
339 SIGSTOP. If omitted defaults to
340 <option>SIGTERM</option>.</para>
345 <term><option>-f</option></term>
346 <term><option>--force</option></term>
349 <para>When used with <command>enable</command>, overwrite
350 any existing conflicting symlinks.</para>
352 <para>When used with <command>halt</command>,
353 <command>poweroff</command>, <command>reboot</command> or
354 <command>kexec</command> execute the selected operation
355 without shutting down all units. However, all processes will
356 be killed forcibly and all file systems are unmounted or
357 remounted read-only. This is hence a drastic but relatively
358 safe option to request an immediate reboot. If
359 <option>--force</option> is specified twice for these
360 operations, they will be executed immediately without
361 terminating any processes or umounting any file
362 systems. Warning: specifying <option>--force</option> twice
363 with any of these operations might result in data
369 <term><option>--root=</option></term>
373 <command>enable</command>/<command>disable</command>/<command>is-enabled</command>
374 (and related commands), use alternative root path when
375 looking for unit files.</para>
381 <term><option>--runtime</option></term>
385 <command>enable</command>/<command>disable</command>/<command>is-enabled</command>
386 (and related commands), make changes only temporarily, so
387 that they are dropped on the next reboot. This will have the
388 effect that changes are not made in subdirectories of
389 <filename>/etc</filename> but in <filename>/run</filename>,
390 with identical immediate effects, however, since the latter
391 is lost on reboot, the changes are lost too.</para>
396 <term><option>-H</option></term>
397 <term><option>--host</option></term>
400 <para>Execute operation remotely. Specify a hostname, or
401 username and hostname separated by @, to connect to. This
402 will use SSH to talk to the remote systemd
408 <term><option>-P</option></term>
409 <term><option>--privileged</option></term>
412 <para>Acquire privileges via PolicyKit before executing the
418 <term><option>-n</option></term>
419 <term><option>--lines=</option></term>
422 <para>When used with <command>status</command> controls the
423 number of journal lines to show, counting from the most
424 recent ones. Takes a positive integer argument. Defaults to
430 <term><option>-o</option></term>
431 <term><option>--output=</option></term>
434 <para>When used with <command>status</command> controls the
435 formatting of the journal entries that are shown. For the
436 available choices see
437 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
438 Defaults to <literal>short</literal>.</para>
446 <title>Commands</title>
448 <para>The following commands are understood:</para>
452 <term><command>list-units</command></term>
455 <para>List known units (subject to limitations specified
456 with <option>-t</option>).</para>
458 <para>This is the default command.</para>
462 <term><command>start <replaceable>NAME</replaceable>...</command></term>
465 <para>Start (activate) one or more units specified on the
470 <term><command>stop <replaceable>NAME</replaceable>...</command></term>
473 <para>Stop (deactivate) one or more units specified on the
478 <term><command>reload <replaceable>NAME</replaceable>...</command></term>
481 <para>Asks all units listed on the command line to reload
482 their configuration. Note that this will reload the
483 service-specific configuration, not the unit configuration
484 file of systemd. If you want systemd to reload the
485 configuration file of a unit use the
486 <command>daemon-reload</command> command. In other words:
487 for the example case of Apache, this will reload Apache's
488 <filename>httpd.conf</filename> in the web server, not the
489 <filename>apache.service</filename> systemd unit
492 <para>This command should not be confused with the
493 <command>daemon-reload</command> or <command>load</command>
499 <term><command>restart <replaceable>NAME</replaceable>...</command></term>
502 <para>Restart one or more units specified on the command
503 line. If the units are not running yet they will be
508 <term><command>try-restart <replaceable>NAME</replaceable>...</command></term>
511 <para>Restart one or more units specified on the command
512 line if the units are running. Do nothing if units are not
513 running. Note that for compatibility with Red Hat init
514 scripts <command>condrestart</command> is equivalent to this
519 <term><command>reload-or-restart <replaceable>NAME</replaceable>...</command></term>
522 <para>Reload one or more units if they support it. If not,
523 restart them instead. If the units are not running yet they
524 will be started.</para>
528 <term><command>reload-or-try-restart <replaceable>NAME</replaceable>...</command></term>
531 <para>Reload one or more units if they support it. If not,
532 restart them instead. Do nothing if the units are not
533 running. Note that for compatibility with SysV init scripts
534 <command>force-reload</command> is equivalent to this
539 <term><command>isolate <replaceable>NAME</replaceable></command></term>
542 <para>Start the unit specified on the command line and its
543 dependencies and stop all others.</para>
545 <para>This is similar to changing the runlevel in a
546 traditional init system. The <command>isolate</command>
547 command will immediately stop processes that are not enabled
548 in the new unit, possibly including the graphical
549 environment or terminal you are currently using.</para>
551 <para>Note that this is allowed only on units where
552 <option>AllowIsolate=</option> is enabled. See
553 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
558 <term><command>kill <replaceable>NAME</replaceable>...</command></term>
561 <para>Send a signal to one or more processes of the
562 unit. Use <option>--kill-who=</option> to select which
563 process to kill. Use <option>--kill-mode=</option> to select
564 the kill mode and <option>--signal=</option> to select the
565 signal to send.</para>
569 <term><command>is-active <replaceable>NAME</replaceable>...</command></term>
572 <para>Check whether any of the specified units are active
573 (i.e. running). Returns an exit code 0 if at least one is
574 active, non-zero otherwise. Unless <option>--quiet</option>
575 is specified this will also print the current unit state to
580 <term><command>is-failed <replaceable>NAME</replaceable>...</command></term>
583 <para>Check whether any of the specified units are failed.
584 Returns an exit code 0 if at least one is failed, non-zero
585 otherwise. Unless <option>--quiet</option> is specified this
586 will also print the current unit state to
591 <term><command>status [<replaceable>NAME</replaceable>...|<replaceable>PID</replaceable>...]</command></term>
594 <para>Show terse runtime status information about one or
595 more units, followed by most recent log data from the
596 journal. If no units are specified, show all units (subject
597 to limitations specified with <option>-t</option>). If a PID
598 is passed show information about the unit the process
601 <para>This function is intended to generate human-readable
602 output. If you are looking for computer-parsable output, use
603 <command>show</command> instead.</para>
607 <term><command>show [<replaceable>NAME</replaceable>...|<replaceable>JOB</replaceable>...]</command></term>
610 <para>Show properties of one or more units, jobs, or the
611 manager itself. If no argument is specified properties of
612 the manager will be shown. If a unit name is specified
613 properties of the unit is shown, and if a job id is
614 specified properties of the job is shown. By default, empty
615 properties are suppressed. Use <option>--all</option> to
616 show those too. To select specific properties to show use
617 <option>--property=</option>. This command is intended to be
618 used whenever computer-parsable output is required. Use
619 <command>status</command> if you are looking for formatted
620 human-readable output.</para>
624 <term><command>help <replaceable>NAME</replaceable>...|<replaceable>PID</replaceable>...</command></term>
627 <para>Show manual pages for one or more units, if
628 available. If a PID is passed the manual pages for the unit
629 the process of the PID belongs to is
634 <term><command>reset-failed [<replaceable>NAME</replaceable>...]</command></term>
637 <para>Reset the <literal>failed</literal> state of the
638 specified units, or if no unit name is passed of all
639 units. When a unit fails in some way (i.e. process exiting
640 with non-zero error code, terminating abnormally or timing
641 out) it will automatically enter the
642 <literal>failed</literal> state and its exit code and status
643 is recorded for introspection by the administrator until the
644 service is restarted or reset with this command.</para>
649 <term><command>list-unit-files</command></term>
652 <para>List installed unit files.</para>
657 <term><command>enable <replaceable>NAME</replaceable>...</command></term>
660 <para>Enable one or more unit files or unit file instances,
661 as specified on the command line. This will create a number
662 of symlinks as encoded in the <literal>[Install]</literal>
663 sections of the unit files. After the symlinks have been
664 created the systemd configuration is reloaded (in a way that
665 is equivalent to <command>daemon-reload</command>) to ensure
666 the changes are taken into account immediately. Note that
667 this does not have the effect that any of the units enabled
668 are also started at the same time. If this is desired a
669 separate <command>start</command> command must be invoked
670 for the unit. Also note that in case of instance enablement,
671 symlinks named same as instances are created in install
672 location, however they all point to the same template unit
675 <para>This command will print the actions executed. This
676 output may be suppressed by passing <option>--quiet</option>.
679 <para>Note that this operation creates only the suggested
680 symlinks for the units. While this command is the
681 recommended way to manipulate the unit configuration
682 directory, the administrator is free to make additional
683 changes manually, by placing or removing symlinks in the
684 directory. This is particularly useful to create
685 configurations that deviate from the suggested default
686 installation. In this case the administrator must make sure
687 to invoke <command>daemon-reload</command> manually as
688 necessary, to ensure his changes are taken into account.
691 <para>Enabling units should not be confused with starting
692 (activating) units, as done by the <command>start</command>
693 command. Enabling and starting units is orthogonal: units
694 may be enabled without being started and started without
695 being enabled. Enabling simply hooks the unit into various
696 suggested places (for example, so that the unit is
697 automatically started on boot or when a particular kind of
698 hardware is plugged in). Starting actually spawns the daemon
699 process (in case of service units), or binds the socket (in
700 case of socket units), and so on.</para>
702 <para>Depending on whether <option>--system</option>,
703 <option>--user</option> or <option>--global</option> is
704 specified this enables the unit for the system, for the
705 calling user only or for all future logins of all
706 users. Note that in the last case no systemd daemon
707 configuration is reloaded.</para>
712 <term><command>disable <replaceable>NAME</replaceable>...</command></term>
715 <para>Disables one or more units. This removes all symlinks
716 to the specified unit files from the unit configuration
717 directory, and hence undoes the changes made by
718 <command>enable</command>. Note however that this removes
719 all symlinks to the unit files (i.e. including manual
720 additions), not just those actually created by
721 <command>enable</command>. This call implicitly reloads the
722 systemd daemon configuration after completing the disabling
723 of the units. Note that this command does not implicitly
724 stop the units that are being disabled. If this is desired
725 an additional <command>stop</command> command should be
726 executed afterwards.</para>
728 <para>This command will print the actions executed. This
729 output may be suppressed by passing <option>--quiet</option>.
732 <para>This command honors <option>--system</option>,
733 <option>--user</option>, <option>--global</option> in a
734 similar way as <command>enable</command>.</para>
739 <term><command>is-enabled <replaceable>NAME</replaceable>...</command></term>
742 <para>Checks whether any of the specified unit files are
743 enabled (as with <command>enable</command>). Returns an exit
744 code of 0 if at least one is enabled, non-zero
745 otherwise. Prints the current enable status. To suppress
746 this output use <option>--quiet</option>.</para>
751 <term><command>reenable <replaceable>NAME</replaceable>...</command></term>
754 <para>Reenable one or more unit files, as specified on the
755 command line. This is a combination of
756 <command>disable</command> and <command>enable</command> and
757 is useful to reset the symlinks a unit is enabled with to
758 the defaults configured in the <literal>[Install]</literal>
759 section of the unit file.</para>
764 <term><command>preset <replaceable>NAME</replaceable>...</command></term>
767 <para>Reset one or more unit files, as specified on the
768 command line, to the defaults configured in the preset
769 policy files. This has the same effect as
770 <command>disable</command> or <command>enable</command>,
771 depending how the unit is listed in the preset files. For
772 more information on preset policy format see
773 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
774 For more information on the concept of presets please
776 <ulink url="http://freedesktop.org/wiki/Software/systemd/Preset">Preset</ulink>
782 <term><command>mask <replaceable>NAME</replaceable>...</command></term>
785 <para>Mask one or more unit files, as specified on the
786 command line. This will link these units to
787 <filename>/dev/null</filename>, making it impossible to
788 start them. This is a stronger version of
789 <command>disable</command>, since it prohibits all kinds of
790 activation of the unit, including manual activation. Use
791 this option with care.</para>
796 <term><command>unmask <replaceable>NAME</replaceable>...</command></term>
799 <para>Unmask one or more unit files, as specified on the
800 command line. This will undo the effect of
801 <command>mask</command>.</para>
806 <term><command>link <replaceable>FILENAME</replaceable>...</command></term>
809 <para>Link a unit file that is not in the unit file search
810 paths into the unit file search path. This requires an
811 absolute path to a unit file. The effect of this can be
812 undone with <command>disable</command>. The effect of this
813 command is that a unit file is available for
814 <command>start</command> and other commands although it
815 isn't installed directly in the unit search path.</para>
820 <term><command>load <replaceable>NAME</replaceable>...</command></term>
823 <para>Load one or more units specified on the command
824 line. This will simply load their configuration from disk,
825 but not start them. To start them you need to use the
826 <command>start</command> command which will implicitly load
827 a unit that has not been loaded yet. Note that systemd
828 garbage collects loaded units that are not active or
829 referenced by an active unit. This means that units loaded
830 this way will usually not stay loaded for long. Also note
831 that this command cannot be used to reload unit
832 configuration. Use the <command>daemon-reload</command>
833 command for that. All in all, this command is of little use
834 except for debugging.</para>
836 <para>This command should not be confused with the
837 <command>daemon-reload</command> or
838 <command>reload</command>.</para>
842 <term><command>list-jobs</command></term>
845 <para>List jobs that are in progress.</para>
849 <term><command>cancel <replaceable>JOB</replaceable>...</command></term>
852 <para>Cancel one or more jobs specified on the command line
853 by their numeric job IDs. If no job id is specified, cancel
854 all pending jobs.</para>
858 <term><command>dump</command></term>
861 <para>Dump server status. This will output a (usually very
862 long) human readable manager status dump. Its format is
863 subject to change without notice and should not be parsed by
868 <term><command>list-dependencies <replaceable>NAME</replaceable></command></term>
871 <para>Shows required and wanted units of the specified
872 unit. If no unit is specified
873 <filename>default.target</filename> is implied. Target units
874 are recursively expanded. When <option>--all</option> is
875 passed all other units are recursively expanded as
880 <term><command>snapshot [<replaceable>NAME</replaceable>]</command></term>
883 <para>Create a snapshot. If a snapshot name is specified,
884 the new snapshot will be named after it. If none is
885 specified an automatic snapshot name is generated. In either
886 case, the snapshot name used is printed to STDOUT, unless
887 <option>--quiet</option> is specified.</para>
889 <para>A snapshot refers to a saved state of the systemd
890 manager. It is implemented itself as a unit that is
891 generated dynamically with this command and has dependencies
892 on all units active at the time. At a later time the user
893 may return to this state by using the
894 <command>isolate</command> command on the snapshot unit.
897 <para>Snapshots are only useful for saving and restoring
898 which units are running or are stopped, they do not
899 save/restore any other state. Snapshots are dynamic and lost
904 <term><command>delete <replaceable>NAME</replaceable>...</command></term>
907 <para>Remove a snapshot previously created with
908 <command>snapshot</command>.</para>
912 <term><command>daemon-reload</command></term>
915 <para>Reload systemd manager configuration. This will reload
916 all unit files and recreate the entire dependency
917 tree. While the daemon is reloaded, all sockets systemd
918 listens on on behalf of user configuration will stay
919 accessible.</para> <para>This command should not be confused
920 with the <command>load</command> or
921 <command>reload</command> commands.</para>
925 <term><command>daemon-reexec</command></term>
928 <para>Reexecute the systemd manager. This will serialize the
929 manager state, reexecute the process and deserialize the
930 state again. This command is of little use except for
931 debugging and package upgrades. Sometimes it might be
932 helpful as a heavy-weight <command>daemon-reload</command>.
933 While the daemon is reexecuted all sockets systemd listens
934 on on behalf of user configuration will stay accessible.
939 <term><command>show-environment</command></term>
942 <para>Dump the systemd manager environment block. The
943 environment block will be dumped in straight-forward form
944 suitable for sourcing into a shell script. This environment
945 block will be passed to all processes the manager
950 <term><command>set-environment <replaceable>VARIABLE=VALUE</replaceable>...</command></term>
953 <para>Set one or more systemd manager environment variables,
954 as specified on the command line.</para>
958 <term><command>unset-environment <replaceable>VARIABLE</replaceable>...</command></term>
961 <para>Unset one or more systemd manager environment
962 variables. If only a variable name is specified it will be
963 removed regardless of its value. If a variable and a value
964 are specified the variable is only removed if it has the
965 specified value.</para>
969 <term><command>default</command></term>
972 <para>Enter default mode. This is mostly equivalent to
973 <command>start default.target</command>.</para>
977 <term><command>rescue</command></term>
980 <para>Enter rescue mode. This is mostly equivalent to
981 <command>isolate rescue.target</command> but also prints a
982 wall message to all users.</para>
986 <term><command>emergency</command></term>
989 <para>Enter emergency mode. This is mostly equivalent to
990 <command>isolate emergency.target</command> but also prints
991 a wall message to all users.</para>
995 <term><command>halt</command></term>
998 <para>Shut down and halt the system. This is mostly
999 equivalent to <command>start halt.target</command> but also
1000 prints a wall message to all users. If combined with
1001 <option>--force</option> shutdown of all running services is
1002 skipped, however all processes are killed and all file
1003 systems are unmounted or mounted read-only, immediately
1004 followed by the system halt. If <option>--force</option> is
1005 specified twice the operation is immediately executed
1006 without terminating any processes or unmounting any file
1007 systems. This may result in data loss.</para>
1011 <term><command>poweroff</command></term>
1014 <para>Shut down and power-off the system. This is mostly
1015 equivalent to <command>start poweroff.target</command> but
1016 also prints a wall message to all users. If combined with
1017 <option>--force</option> shutdown of all running services is
1018 skipped, however all processes are killed and all file
1019 systems are unmounted or mounted read-only, immediately
1020 followed by the powering off. If <option>--force</option> is
1021 specified twice the operation is immediately executed
1022 without terminating any processes or unmounting any file
1023 systems. This may result in data loss.</para>
1027 <term><command>reboot</command></term>
1030 <para>Shut down and reboot the system. This is mostly
1031 equivalent to <command>start reboot.target</command> but
1032 also prints a wall message to all users. If combined with
1033 <option>--force</option> shutdown of all running services is
1034 skipped, however all processes are killed and all file
1035 systems are unmounted or mounted read-only, immediately
1036 followed by the reboot. If <option>--force</option> is
1037 specified twice the operation is immediately executed
1038 without terminating any processes or unmounting any file
1039 systems. This may result in data loss.</para>
1043 <term><command>kexec</command></term>
1046 <para>Shut down and reboot the system via kexec. This is
1047 mostly equivalent to <command>start kexec.target</command>
1048 but also prints a wall message to all users. If combined
1049 with <option>--force</option> shutdown of all running
1050 services is skipped, however all processes are killed and
1051 all file systems are unmounted or mounted read-only,
1052 immediately followed by the reboot.</para>
1056 <term><command>exit</command></term>
1059 <para>Ask the systemd manager to quit. This is only
1060 supported for user service managers (i.e. in conjunction
1061 with the <option>--user</option> option) and will fail
1067 <term><command>suspend</command></term>
1070 <para>Suspend the system. This will trigger activation of
1071 the special <filename>suspend.target</filename> target.
1076 <term><command>hibernate</command></term>
1079 <para>Hibernate the system. This will trigger activation of
1080 the special <filename>hibernate.target</filename> target.
1085 <term><command>hybrid-sleep</command></term>
1088 <para>Hibernate and suspend the system. This will trigger
1089 activation of the special
1090 <filename>hybrid-sleep.target</filename> target.</para>
1094 <term><command>switch-root <replaceable>ROOT</replaceable> [<replaceable>INIT</replaceable>]</command></term>
1097 <para>Switches to a different root directory and executes a
1098 new system manager process below it. This is intended for
1099 usage in initial RAM disks ("initrd"), and will transition
1100 from the initrd's system manager process (a.k.a "init"
1101 process) to the main system manager process. Takes two
1102 arguments: the directory to make the new root directory, and
1103 the path to the new system manager binary below it to
1104 execute as PID 1. If the latter is omitted or the empty
1105 string, a systemd binary will automatically be searched for
1106 and used as init. If the system manager path is omitted or
1107 equal to the empty string the state of the initrd's system
1108 manager process is passed to the main system manager, which
1109 allows later introspection of the state of the services
1110 involved in the initrd boot.</para>
1118 <title>Exit status</title>
1120 <para>On success 0 is returned, a non-zero failure
1121 code otherwise.</para>
1125 <title>Environment</title>
1127 <variablelist class='environment-variables'>
1129 <term><varname>$SYSTEMD_PAGER</varname></term>
1132 <para>Pager to use when <option>--no-pager</option> is not
1133 given; overrides <varname>$PAGER</varname>. Setting this to
1134 an empty string or the value <literal>cat</literal> is
1135 equivalent to passing
1136 <option>--no-pager</option>.</para>
1143 <title>See Also</title>
1145 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1146 <citerefentry><refentrytitle>systemadm</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1147 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1148 <citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1149 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
1150 <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
1151 <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
1152 <citerefentry><refentrytitle>systemd.preset</refentrytitle><manvolnum>5</manvolnum></citerefentry>