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