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 General Public License as published by
12 the Free Software Foundation; either version 2 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 General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id="shutdown">
27 <title>shutdown</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>shutdown</refentrytitle>
42 <manvolnum>8</manvolnum>
46 <refname>shutdown</refname>
47 <refpurpose>Halt, power-off or reboot the machine</refpurpose>
52 <command>shutdown <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt">TIME</arg> <arg choice="opt" rep="repeat">WALL</arg></command>
57 <title>Description</title>
59 <para><command>shutdown</command> may be used to halt,
60 power-off or reboot the machine.</para>
62 <para>The first argument may be a time string (which
63 is usually <literal>now</literal>). Optionally, this
64 may be followed by a wall message to be sent to all
65 logged-in users before going down.</para>
67 <para>The time string may either be in the format
68 <literal>hh:mm</literal> for hour/minutes specifying
69 the time to execute the shutdown at, specified in 24h
70 clock format. Alternatively it may be in the syntax
71 <literal>+m</literal> referring to the specified
72 number of minutes m from now. <literal>now</literal>
73 is an alias for <literal>+0</literal>, i.e. for
74 triggering an immediate shutdown. If no time argument
75 is specified, <literal>+1</literal> is
78 <para>Note that to specify a wall message you must
79 specify a time argument, too.</para>
81 <para>If the time argument is used, 5 minutes
82 before the system goes down the
83 <filename>/etc/nologin</filename> file is created to
84 ensure that further logins shall not be
89 <title>Options</title>
91 <para>The following options are understood:</para>
95 <term><option>--help</option></term>
97 <listitem><para>Prints a short help
98 text and exits.</para></listitem>
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>Don't halt, power-off,
137 reboot, just write wall
138 message.</para></listitem>
142 <term><option>--no-wall</option></term>
144 <listitem><para>Don't 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>
174 <para>This is a legacy command available for
175 compatibility only.</para>
179 <title>See Also</title>
181 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
182 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
183 <citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
184 <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>