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