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="shutdown"
25 xmlns:xi="http://www.w3.org/2001/XInclude">
28 <title>shutdown</title>
29 <productname>systemd</productname>
33 <contrib>Developer</contrib>
34 <firstname>Lennart</firstname>
35 <surname>Poettering</surname>
36 <email>lennart@poettering.net</email>
42 <refentrytitle>shutdown</refentrytitle>
43 <manvolnum>8</manvolnum>
47 <refname>shutdown</refname>
48 <refpurpose>Halt, power-off or reboot the machine</refpurpose>
53 <command>shutdown <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt">TIME</arg> <arg choice="opt" rep="repeat">WALL</arg></command>
58 <title>Description</title>
60 <para><command>shutdown</command> may be used to halt,
61 power-off or reboot the machine.</para>
63 <para>The first argument may be a time string (which
64 is usually <literal>now</literal>). Optionally, this
65 may be followed by a wall message to be sent to all
66 logged-in users before going down.</para>
68 <para>The time string may either be in the format
69 <literal>hh:mm</literal> for hour/minutes specifying
70 the time to execute the shutdown at, specified in 24h
71 clock format. Alternatively it may be in the syntax
72 <literal>+m</literal> referring to the specified
73 number of minutes m from now. <literal>now</literal>
74 is an alias for <literal>+0</literal>, i.e. for
75 triggering an immediate shutdown. If no time argument
76 is specified, <literal>+1</literal> is
79 <para>Note that to specify a wall message you must
80 specify a time argument, too.</para>
82 <para>If the time argument is used, 5 minutes
83 before the system goes down the
84 <filename>/run/nologin</filename> file is created to
85 ensure that further logins shall not be
90 <title>Options</title>
92 <para>The following options are understood:</para>
96 <term><option>--help</option></term>
98 <xi:include href="standard-options.xml" xpointer="help-text" />
102 <term><option>-H</option></term>
103 <term><option>--halt</option></term>
105 <listitem><para>Halt the machine.</para></listitem>
109 <term><option>-P</option></term>
110 <term><option>--poweroff</option></term>
112 <listitem><para>Power-off the
113 machine (the default).</para></listitem>
117 <term><option>-r</option></term>
118 <term><option>--reboot</option></term>
120 <listitem><para>Reboot the
121 machine.</para></listitem>
125 <term><option>-h</option></term>
127 <listitem><para>Equivalent to
128 <option>--poweroff</option>, unless
129 <option>--halt</option> is
130 specified.</para></listitem>
134 <term><option>-k</option></term>
136 <listitem><para>Do not halt, power-off,
137 reboot, just write wall
138 message.</para></listitem>
142 <term><option>--no-wall</option></term>
144 <listitem><para>Do not send wall
146 halt, power-off, reboot.</para></listitem>
150 <term><option>-c</option></term>
152 <listitem><para>Cancel a pending
153 shutdown. This may be used cancel the
154 effect of an invocation of
155 <command>shutdown</command> with a
156 time argument that is not
157 <literal>+0</literal> or
158 <literal>now</literal>.</para></listitem>
165 <title>Exit status</title>
167 <para>On success, 0 is returned, a non-zero failure
168 code otherwise.</para>
172 <title>See Also</title>
174 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
175 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
176 <citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
177 <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>