]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/shutdown.xml
Merge pull request #74 from systemd-mailing-devs/1432753344-31461-1-git-send-email...
[thirdparty/systemd.git] / man / shutdown.xml
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 <!ENTITY % entities SYSTEM "custom-entities.ent" >
5 %entities;
6 ]>
7
8 <!--
9 This file is part of systemd.
10
11 Copyright 2010 Lennart Poettering
12
13 systemd is free software; you can redistribute it and/or modify it
14 under the terms of the GNU Lesser General Public License as published by
15 the Free Software Foundation; either version 2.1 of the License, or
16 (at your option) any later version.
17
18 systemd is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public License
24 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25 -->
26
27 <refentry id="shutdown"
28 xmlns:xi="http://www.w3.org/2001/XInclude">
29
30 <refentryinfo>
31 <title>shutdown</title>
32 <productname>systemd</productname>
33
34 <authorgroup>
35 <author>
36 <contrib>Developer</contrib>
37 <firstname>Lennart</firstname>
38 <surname>Poettering</surname>
39 <email>lennart@poettering.net</email>
40 </author>
41 </authorgroup>
42 </refentryinfo>
43
44 <refmeta>
45 <refentrytitle>shutdown</refentrytitle>
46 <manvolnum>8</manvolnum>
47 </refmeta>
48
49 <refnamediv>
50 <refname>shutdown</refname>
51 <refpurpose>Halt, power-off or reboot the machine</refpurpose>
52 </refnamediv>
53
54 <refsynopsisdiv>
55 <cmdsynopsis>
56 <command>shutdown</command>
57 <arg choice="opt" rep="repeat">OPTIONS</arg>
58 <arg choice="opt">TIME</arg>
59 <arg choice="opt" rep="repeat">WALL</arg>
60 </cmdsynopsis>
61 </refsynopsisdiv>
62
63 <refsect1>
64 <title>Description</title>
65
66 <para><command>shutdown</command> may be used to halt, power-off
67 or reboot the machine.</para>
68
69 <para>The first argument may be a time string (which is usually
70 <literal>now</literal>). Optionally, this may be followed by a
71 wall message to be sent to all logged-in users before going
72 down.</para>
73
74 <para>The time string may either be in the format
75 <literal>hh:mm</literal> for hour/minutes specifying the time to
76 execute the shutdown at, specified in 24h clock format.
77 Alternatively it may be in the syntax <literal>+m</literal>
78 referring to the specified number of minutes m from now.
79 <literal>now</literal> is an alias for <literal>+0</literal>, i.e.
80 for triggering an immediate shutdown. If no time argument is
81 specified, <literal>+1</literal> is implied.</para>
82
83 <para>Note that to specify a wall message you must specify a time
84 argument, too.</para>
85
86 <para>If the time argument is used, 5 minutes before the system
87 goes down the <filename>/run/nologin</filename> file is created to
88 ensure that further logins shall not be allowed.</para>
89 </refsect1>
90
91 <refsect1>
92 <title>Options</title>
93
94 <para>The following options are understood:</para>
95
96 <variablelist>
97 <varlistentry>
98 <term><option>--help</option></term>
99
100 <xi:include href="standard-options.xml" xpointer="help-text" />
101 </varlistentry>
102
103 <varlistentry>
104 <term><option>-H</option></term>
105 <term><option>--halt</option></term>
106
107 <listitem><para>Halt the machine.</para></listitem>
108 </varlistentry>
109
110 <varlistentry>
111 <term><option>-P</option></term>
112 <term><option>--poweroff</option></term>
113
114 <listitem><para>Power-off the machine (the
115 default).</para></listitem>
116 </varlistentry>
117
118 <varlistentry>
119 <term><option>-r</option></term>
120 <term><option>--reboot</option></term>
121
122 <listitem><para>Reboot the
123 machine.</para></listitem>
124 </varlistentry>
125
126 <varlistentry>
127 <term><option>-h</option></term>
128
129 <listitem><para>Equivalent to <option>--poweroff</option>,
130 unless <option>--halt</option> is specified.</para></listitem>
131 </varlistentry>
132
133 <varlistentry>
134 <term><option>-k</option></term>
135
136 <listitem><para>Do not halt, power-off, reboot, just write
137 wall message.</para></listitem>
138 </varlistentry>
139
140 <varlistentry>
141 <term><option>--no-wall</option></term>
142
143 <listitem><para>Do not send wall
144 message before
145 halt, power-off, reboot.</para></listitem>
146 </varlistentry>
147
148 <varlistentry>
149 <term><option>-c</option></term>
150
151 <listitem><para>Cancel a pending shutdown. This may be used
152 cancel the effect of an invocation of
153 <command>shutdown</command> with a time argument that is not
154 <literal>+0</literal> or
155 <literal>now</literal>.</para></listitem>
156 </varlistentry>
157
158 </variablelist>
159 </refsect1>
160
161 <refsect1>
162 <title>Exit status</title>
163
164 <para>On success, 0 is returned, a non-zero failure code
165 otherwise.</para>
166 </refsect1>
167
168 <refsect1>
169 <title>See Also</title>
170 <para>
171 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
172 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
173 <citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
174 <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
175 </para>
176 </refsect1>
177
178 </refentry>