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