]>
Commit | Line | Data |
---|---|---|
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 | ||
24 | <refentry id="shutdown"> | |
25 | ||
26 | <refentryinfo> | |
27 | <title>shutdown</title> | |
28 | <productname>systemd</productname> | |
29 | ||
30 | <authorgroup> | |
31 | <author> | |
32 | <contrib>Developer</contrib> | |
33 | <firstname>Lennart</firstname> | |
34 | <surname>Poettering</surname> | |
35 | <email>lennart@poettering.net</email> | |
36 | </author> | |
37 | </authorgroup> | |
38 | </refentryinfo> | |
39 | ||
40 | <refmeta> | |
41 | <refentrytitle>shutdown</refentrytitle> | |
42 | <manvolnum>8</manvolnum> | |
43 | </refmeta> | |
44 | ||
45 | <refnamediv> | |
46 | <refname>shutdown</refname> | |
47 | <refpurpose>Halt, power-off or reboot the machine</refpurpose> | |
48 | </refnamediv> | |
49 | ||
50 | <refsynopsisdiv> | |
51 | <cmdsynopsis> | |
5dc50792 | 52 | <command>shutdown <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt">TIME</arg> <arg choice="opt" rep="repeat">WALL</arg></command> |
160cd5c9 LP |
53 | </cmdsynopsis> |
54 | </refsynopsisdiv> | |
55 | ||
56 | <refsect1> | |
57 | <title>Description</title> | |
58 | ||
59 | <para><command>shutdown</command> may be used to halt, | |
60 | power-off or reboot the machine.</para> | |
61 | ||
5dc50792 LP |
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> | |
66 | ||
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 | |
6b5ad000 | 75 | is specified, <literal>+1</literal> is |
5dc50792 LP |
76 | implied.</para> |
77 | ||
78 | <para>Note that to specify a wall message you must | |
5471472d | 79 | specify a time argument, too.</para> |
5dc50792 LP |
80 | |
81 | <para>If the time argument is used, 5 minutes | |
82 | before the system goes down the | |
72536eb7 | 83 | <filename>/run/nologin</filename> file is created to |
5dc50792 LP |
84 | ensure that further logins shall not be |
85 | allowed.</para> | |
160cd5c9 LP |
86 | </refsect1> |
87 | ||
88 | <refsect1> | |
89 | <title>Options</title> | |
90 | ||
91 | <para>The following options are understood:</para> | |
92 | ||
93 | <variablelist> | |
94 | <varlistentry> | |
95 | <term><option>--help</option></term> | |
96 | ||
97 | <listitem><para>Prints a short help | |
98 | text and exits.</para></listitem> | |
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 LP |
135 | |
136 | <listitem><para>Don't halt, power-off, | |
137 | reboot, just write wall | |
138 | message.</para></listitem> | |
139 | </varlistentry> | |
140 | ||
141 | <varlistentry> | |
142 | <term><option>--no-wall</option></term> | |
143 | ||
144 | <listitem><para>Don't send wall | |
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 | ||
167 | <para>On success 0 is returned, a non-zero failure | |
168 | code otherwise.</para> | |
169 | </refsect1> | |
170 | ||
171 | <refsect1> | |
172 | <title>Notes</title> | |
173 | ||
174 | <para>This is a legacy command available for | |
175 | compatibility only.</para> | |
176 | </refsect1> | |
177 | ||
178 | <refsect1> | |
179 | <title>See Also</title> | |
180 | <para> | |
181 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
182 | <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
7874bcd6 LP |
183 | <citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>, |
184 | <citerefentry><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
160cd5c9 LP |
185 | </para> |
186 | </refsect1> | |
187 | ||
188 | </refentry> |