1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id="shutdown"
7 xmlns:xi="http://www.w3.org/2001/XInclude">
10 <title>shutdown</title>
11 <productname>systemd</productname>
15 <refentrytitle>shutdown</refentrytitle>
16 <manvolnum>8</manvolnum>
20 <refname>shutdown</refname>
21 <refpurpose>Halt, power off or reboot the machine</refpurpose>
26 <command>shutdown</command>
27 <arg choice="opt" rep="repeat">OPTIONS</arg>
28 <arg choice="opt">TIME</arg>
29 <arg choice="opt" rep="repeat">WALL</arg>
34 <title>Description</title>
36 <para><command>shutdown</command> may be used to halt, power off, or reboot the machine.</para>
38 <para>The first argument may be a time string (which is usually
39 <literal>now</literal>). Optionally, this may be followed by a
40 wall message to be sent to all logged-in users before going
43 <para>The time string may either be in the format
44 <literal>hh:mm</literal> for hour/minutes specifying the time to
45 execute the shutdown at, specified in 24h clock format.
46 Alternatively it may be in the syntax <literal>+m</literal>
47 referring to the specified number of minutes m from now.
48 <literal>now</literal> is an alias for <literal>+0</literal>, i.e.
49 for triggering an immediate shutdown. If no time argument is
50 specified, <literal>+1</literal> is implied.</para>
52 <para>Note that to specify a wall message you must specify a time
55 <para>If the time argument is used, 5 minutes before the system
56 goes down the <filename>/run/nologin</filename> file is created to
57 ensure that further logins shall not be allowed.</para>
61 <title>Options</title>
63 <para>The following options are understood:</para>
67 <term><option>--help</option></term>
69 <xi:include href="standard-options.xml" xpointer="help-text" />
73 <term><option>-H</option></term>
74 <term><option>--halt</option></term>
76 <listitem><para>Halt the machine.</para></listitem>
80 <term><option>-P</option></term>
81 <term><option>--poweroff</option></term>
83 <listitem><para>Power the machine off (the default).</para></listitem>
87 <term><option>-r</option></term>
88 <term><option>--reboot</option></term>
90 <listitem><para>Reboot the machine.</para></listitem>
94 <term><option>-h</option></term>
96 <listitem><para>The same as <option>--poweroff</option>, but does not override the action to take if
97 it is "halt". E.g. <command>shutdown --reboot -h</command> means "poweroff", but <command>shutdown
98 --halt -h</command> means "halt".</para></listitem>
102 <term><option>-k</option></term>
104 <listitem><para>Do not halt, power off, or reboot, but just write the wall message.</para></listitem>
108 <term><option>--no-wall</option></term>
110 <listitem><para>Do not send wall message before halt, power off, or reboot.</para></listitem>
114 <term><option>-c</option></term>
116 <listitem><para>Cancel a pending shutdown. This may be used to cancel the effect of an invocation of
117 <command>shutdown</command> with a time argument that is not <literal>+0</literal> or
118 <literal>now</literal>.</para></listitem>
122 <term><option>--show</option></term>
124 <listitem><para>Show a pending shutdown action and time if
127 <xi:include href="version-info.xml" xpointer="v250"/></listitem>
134 <title>Exit status</title>
136 <para>On success, 0 is returned, a non-zero failure code
141 <title>Compatibility</title>
143 <para>The <command> shutdown</command> command in previous init systems (including sysvinit) defaulted to
144 single-user mode instead of powering off the machine. To change into single-user mode, use
145 <command>systemctl rescue</command> instead.</para>
149 <title>See Also</title>
150 <para><simplelist type="inline">
151 <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
152 <member><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
153 <member><citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
154 <member><citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>