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+
8 This file is part of systemd.
10 Copyright 2010 Lennart Poettering
13 <refentry id=
"shutdown"
14 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
17 <title>shutdown
</title>
18 <productname>systemd
</productname>
22 <contrib>Developer
</contrib>
23 <firstname>Lennart
</firstname>
24 <surname>Poettering
</surname>
25 <email>lennart@poettering.net
</email>
31 <refentrytitle>shutdown
</refentrytitle>
32 <manvolnum>8</manvolnum>
36 <refname>shutdown
</refname>
37 <refpurpose>Halt, power-off or reboot the machine
</refpurpose>
42 <command>shutdown
</command>
43 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
44 <arg choice=
"opt">TIME
</arg>
45 <arg choice=
"opt" rep=
"repeat">WALL
</arg>
50 <title>Description
</title>
52 <para><command>shutdown
</command> may be used to halt, power-off
53 or reboot the machine.
</para>
55 <para>The first argument may be a time string (which is usually
56 <literal>now
</literal>). Optionally, this may be followed by a
57 wall message to be sent to all logged-in users before going
60 <para>The time string may either be in the format
61 <literal>hh:mm
</literal> for hour/minutes specifying the time to
62 execute the shutdown at, specified in
24h clock format.
63 Alternatively it may be in the syntax
<literal>+m
</literal>
64 referring to the specified number of minutes m from now.
65 <literal>now
</literal> is an alias for
<literal>+
0</literal>, i.e.
66 for triggering an immediate shutdown. If no time argument is
67 specified,
<literal>+
1</literal> is implied.
</para>
69 <para>Note that to specify a wall message you must specify a time
72 <para>If the time argument is used,
5 minutes before the system
73 goes down the
<filename>/run/nologin
</filename> file is created to
74 ensure that further logins shall not be allowed.
</para>
78 <title>Options
</title>
80 <para>The following options are understood:
</para>
84 <term><option>--help
</option></term>
86 <xi:include href=
"standard-options.xml" xpointer=
"help-text" />
90 <term><option>-H
</option></term>
91 <term><option>--halt
</option></term>
93 <listitem><para>Halt the machine.
</para></listitem>
97 <term><option>-P
</option></term>
98 <term><option>--poweroff
</option></term>
100 <listitem><para>Power-off the machine (the
101 default).
</para></listitem>
105 <term><option>-r
</option></term>
106 <term><option>--reboot
</option></term>
108 <listitem><para>Reboot the
109 machine.
</para></listitem>
113 <term><option>-h
</option></term>
115 <listitem><para>Equivalent to
<option>--poweroff
</option>,
116 unless
<option>--halt
</option> is specified.
</para></listitem>
120 <term><option>-k
</option></term>
122 <listitem><para>Do not halt, power-off, reboot, just write
123 wall message.
</para></listitem>
127 <term><option>--no-wall
</option></term>
129 <listitem><para>Do not send wall
131 halt, power-off, reboot.
</para></listitem>
135 <term><option>-c
</option></term>
137 <listitem><para>Cancel a pending shutdown. This may be used
138 cancel the effect of an invocation of
139 <command>shutdown
</command> with a time argument that is not
140 <literal>+
0</literal> or
141 <literal>now
</literal>.
</para></listitem>
148 <title>Exit status
</title>
150 <para>On success,
0 is returned, a non-zero failure code
155 <title>See Also
</title>
157 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
158 <citerefentry><refentrytitle>systemctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
159 <citerefentry><refentrytitle>halt
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
160 <citerefentry project='man-pages'
><refentrytitle>wall
</refentrytitle><manvolnum>1</manvolnum></citerefentry>