]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/shutdown.xml
TODO: Remove Elapsed Time DHCPv6 option as it is done
[thirdparty/systemd.git] / man / shutdown.xml
CommitLineData
160cd5c9
LP
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">
4
5<!--
6 This file is part of systemd.
7
8 Copyright 2010 Lennart Poettering
9
10 systemd is free software; you can redistribute it and/or modify it
5430f7f2
LP
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
160cd5c9
LP
13 (at your option) any later version.
14
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
5430f7f2 18 Lesser General Public License for more details.
160cd5c9 19
5430f7f2 20 You should have received a copy of the GNU Lesser General Public License
160cd5c9
LP
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
22-->
23
dfdebb1b
ZJS
24<refentry id="shutdown"
25 xmlns:xi="http://www.w3.org/2001/XInclude">
160cd5c9
LP
26
27 <refentryinfo>
28 <title>shutdown</title>
29 <productname>systemd</productname>
30
31 <authorgroup>
32 <author>
33 <contrib>Developer</contrib>
34 <firstname>Lennart</firstname>
35 <surname>Poettering</surname>
36 <email>lennart@poettering.net</email>
37 </author>
38 </authorgroup>
39 </refentryinfo>
40
41 <refmeta>
42 <refentrytitle>shutdown</refentrytitle>
43 <manvolnum>8</manvolnum>
44 </refmeta>
45
46 <refnamediv>
47 <refname>shutdown</refname>
48 <refpurpose>Halt, power-off or reboot the machine</refpurpose>
49 </refnamediv>
50
51 <refsynopsisdiv>
52 <cmdsynopsis>
5dc50792 53 <command>shutdown <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt">TIME</arg> <arg choice="opt" rep="repeat">WALL</arg></command>
160cd5c9
LP
54 </cmdsynopsis>
55 </refsynopsisdiv>
56
57 <refsect1>
58 <title>Description</title>
59
60 <para><command>shutdown</command> may be used to halt,
61 power-off or reboot the machine.</para>
62
5dc50792
LP
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>
67
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
6b5ad000 76 is specified, <literal>+1</literal> is
5dc50792
LP
77 implied.</para>
78
79 <para>Note that to specify a wall message you must
5471472d 80 specify a time argument, too.</para>
5dc50792
LP
81
82 <para>If the time argument is used, 5 minutes
83 before the system goes down the
72536eb7 84 <filename>/run/nologin</filename> file is created to
5dc50792
LP
85 ensure that further logins shall not be
86 allowed.</para>
160cd5c9
LP
87 </refsect1>
88
89 <refsect1>
90 <title>Options</title>
91
92 <para>The following options are understood:</para>
93
94 <variablelist>
95 <varlistentry>
96 <term><option>--help</option></term>
97
dfdebb1b 98 <xi:include href="standard-options.xml" xpointer="help-text" />
160cd5c9
LP
99 </varlistentry>
100
101 <varlistentry>
102 <term><option>-H</option></term>
103 <term><option>--halt</option></term>
104
105 <listitem><para>Halt the machine.</para></listitem>
106 </varlistentry>
107
108 <varlistentry>
109 <term><option>-P</option></term>
110 <term><option>--poweroff</option></term>
111
112 <listitem><para>Power-off the
113 machine (the default).</para></listitem>
114 </varlistentry>
115
116 <varlistentry>
117 <term><option>-r</option></term>
118 <term><option>--reboot</option></term>
119
120 <listitem><para>Reboot the
121 machine.</para></listitem>
122 </varlistentry>
123
124 <varlistentry>
125 <term><option>-h</option></term>
126
127 <listitem><para>Equivalent to
128 <option>--poweroff</option>, unless
129 <option>--halt</option> is
130 specified.</para></listitem>
131 </varlistentry>
132
133 <varlistentry>
0079e4d9 134 <term><option>-k</option></term>
160cd5c9 135
6b4991cf 136 <listitem><para>Do not halt, power-off,
160cd5c9
LP
137 reboot, just write wall
138 message.</para></listitem>
139 </varlistentry>
140
141 <varlistentry>
142 <term><option>--no-wall</option></term>
143
6b4991cf 144 <listitem><para>Do not send wall
160cd5c9
LP
145 message before
146 halt, power-off, reboot.</para></listitem>
147 </varlistentry>
5dc50792 148
5dc50792
LP
149 <varlistentry>
150 <term><option>-c</option></term>
151
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>
159 </varlistentry>
160
160cd5c9
LP
161 </variablelist>
162 </refsect1>
163
164 <refsect1>
165 <title>Exit status</title>
166
b040723e 167 <para>On success, 0 is returned, a non-zero failure
160cd5c9
LP
168 code otherwise.</para>
169 </refsect1>
170
160cd5c9
LP
171 <refsect1>
172 <title>See Also</title>
173 <para>
174 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
175 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
7874bcd6 176 <citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
5aded369 177 <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
160cd5c9
LP
178 </para>
179 </refsect1>
180
181</refentry>