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 SPDX-License-Identifier: LGPL-2.1+
9 <refentry id=
"shutdown"
10 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
13 <title>shutdown
</title>
14 <productname>systemd
</productname>
18 <contrib>Developer
</contrib>
19 <firstname>Lennart
</firstname>
20 <surname>Poettering
</surname>
21 <email>lennart@poettering.net
</email>
27 <refentrytitle>shutdown
</refentrytitle>
28 <manvolnum>8</manvolnum>
32 <refname>shutdown
</refname>
33 <refpurpose>Halt, power-off or reboot the machine
</refpurpose>
38 <command>shutdown
</command>
39 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
40 <arg choice=
"opt">TIME
</arg>
41 <arg choice=
"opt" rep=
"repeat">WALL
</arg>
46 <title>Description
</title>
48 <para><command>shutdown
</command> may be used to halt, power-off
49 or reboot the machine.
</para>
51 <para>The first argument may be a time string (which is usually
52 <literal>now
</literal>). Optionally, this may be followed by a
53 wall message to be sent to all logged-in users before going
56 <para>The time string may either be in the format
57 <literal>hh:mm
</literal> for hour/minutes specifying the time to
58 execute the shutdown at, specified in
24h clock format.
59 Alternatively it may be in the syntax
<literal>+m
</literal>
60 referring to the specified number of minutes m from now.
61 <literal>now
</literal> is an alias for
<literal>+
0</literal>, i.e.
62 for triggering an immediate shutdown. If no time argument is
63 specified,
<literal>+
1</literal> is implied.
</para>
65 <para>Note that to specify a wall message you must specify a time
68 <para>If the time argument is used,
5 minutes before the system
69 goes down the
<filename>/run/nologin
</filename> file is created to
70 ensure that further logins shall not be allowed.
</para>
74 <title>Options
</title>
76 <para>The following options are understood:
</para>
80 <term><option>--help
</option></term>
82 <xi:include href=
"standard-options.xml" xpointer=
"help-text" />
86 <term><option>-H
</option></term>
87 <term><option>--halt
</option></term>
89 <listitem><para>Halt the machine.
</para></listitem>
93 <term><option>-P
</option></term>
94 <term><option>--poweroff
</option></term>
96 <listitem><para>Power-off the machine (the
97 default).
</para></listitem>
101 <term><option>-r
</option></term>
102 <term><option>--reboot
</option></term>
104 <listitem><para>Reboot the
105 machine.
</para></listitem>
109 <term><option>-h
</option></term>
111 <listitem><para>Equivalent to
<option>--poweroff
</option>,
112 unless
<option>--halt
</option> is specified.
</para></listitem>
116 <term><option>-k
</option></term>
118 <listitem><para>Do not halt, power-off, reboot, just write
119 wall message.
</para></listitem>
123 <term><option>--no-wall
</option></term>
125 <listitem><para>Do not send wall
127 halt, power-off, reboot.
</para></listitem>
131 <term><option>-c
</option></term>
133 <listitem><para>Cancel a pending shutdown. This may be used
134 cancel the effect of an invocation of
135 <command>shutdown
</command> with a time argument that is not
136 <literal>+
0</literal> or
137 <literal>now
</literal>.
</para></listitem>
144 <title>Exit status
</title>
146 <para>On success,
0 is returned, a non-zero failure code
151 <title>See Also
</title>
153 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
154 <citerefentry><refentrytitle>systemctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
155 <citerefentry><refentrytitle>halt
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
156 <citerefentry project='man-pages'
><refentrytitle>wall
</refentrytitle><manvolnum>1</manvolnum></citerefentry>