]>
Commit | Line | Data |
---|---|---|
160cd5c9 | 1 | <?xml version='1.0'?> <!--*-nxml-*--> |
3a54a157 | 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
12b42c76 | 3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
db9ecf05 | 4 | <!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
160cd5c9 | 5 | |
dfdebb1b | 6 | <refentry id="shutdown" |
798d3a52 ZJS |
7 | xmlns:xi="http://www.w3.org/2001/XInclude"> |
8 | ||
9 | <refentryinfo> | |
10 | <title>shutdown</title> | |
11 | <productname>systemd</productname> | |
798d3a52 ZJS |
12 | </refentryinfo> |
13 | ||
14 | <refmeta> | |
15 | <refentrytitle>shutdown</refentrytitle> | |
16 | <manvolnum>8</manvolnum> | |
17 | </refmeta> | |
18 | ||
19 | <refnamediv> | |
20 | <refname>shutdown</refname> | |
21 | <refpurpose>Halt, power-off or reboot the machine</refpurpose> | |
22 | </refnamediv> | |
23 | ||
24 | <refsynopsisdiv> | |
25 | <cmdsynopsis> | |
26 | <command>shutdown</command> | |
27 | <arg choice="opt" rep="repeat">OPTIONS</arg> | |
28 | <arg choice="opt">TIME</arg> | |
29 | <arg choice="opt" rep="repeat">WALL</arg> | |
30 | </cmdsynopsis> | |
31 | </refsynopsisdiv> | |
32 | ||
33 | <refsect1> | |
34 | <title>Description</title> | |
35 | ||
36 | <para><command>shutdown</command> may be used to halt, power-off | |
37 | or reboot the machine.</para> | |
38 | ||
39 | <para>The first argument may be a time string (which is usually | |
40 | <literal>now</literal>). Optionally, this may be followed by a | |
41 | wall message to be sent to all logged-in users before going | |
42 | down.</para> | |
43 | ||
44 | <para>The time string may either be in the format | |
45 | <literal>hh:mm</literal> for hour/minutes specifying the time to | |
46 | execute the shutdown at, specified in 24h clock format. | |
47 | Alternatively it may be in the syntax <literal>+m</literal> | |
48 | referring to the specified number of minutes m from now. | |
49 | <literal>now</literal> is an alias for <literal>+0</literal>, i.e. | |
50 | for triggering an immediate shutdown. If no time argument is | |
51 | specified, <literal>+1</literal> is implied.</para> | |
52 | ||
53 | <para>Note that to specify a wall message you must specify a time | |
54 | argument, too.</para> | |
55 | ||
56 | <para>If the time argument is used, 5 minutes before the system | |
57 | goes down the <filename>/run/nologin</filename> file is created to | |
58 | ensure that further logins shall not be allowed.</para> | |
59 | </refsect1> | |
60 | ||
61 | <refsect1> | |
62 | <title>Options</title> | |
63 | ||
64 | <para>The following options are understood:</para> | |
65 | ||
66 | <variablelist> | |
67 | <varlistentry> | |
68 | <term><option>--help</option></term> | |
69 | ||
70 | <xi:include href="standard-options.xml" xpointer="help-text" /> | |
71 | </varlistentry> | |
72 | ||
73 | <varlistentry> | |
74 | <term><option>-H</option></term> | |
75 | <term><option>--halt</option></term> | |
76 | ||
77 | <listitem><para>Halt the machine.</para></listitem> | |
78 | </varlistentry> | |
79 | ||
80 | <varlistentry> | |
81 | <term><option>-P</option></term> | |
82 | <term><option>--poweroff</option></term> | |
83 | ||
84 | <listitem><para>Power-off the machine (the | |
85 | default).</para></listitem> | |
86 | </varlistentry> | |
87 | ||
88 | <varlistentry> | |
89 | <term><option>-r</option></term> | |
90 | <term><option>--reboot</option></term> | |
91 | ||
92 | <listitem><para>Reboot the | |
93 | machine.</para></listitem> | |
94 | </varlistentry> | |
95 | ||
96 | <varlistentry> | |
97 | <term><option>-h</option></term> | |
98 | ||
99 | <listitem><para>Equivalent to <option>--poweroff</option>, | |
100 | unless <option>--halt</option> is specified.</para></listitem> | |
101 | </varlistentry> | |
102 | ||
103 | <varlistentry> | |
104 | <term><option>-k</option></term> | |
105 | ||
106 | <listitem><para>Do not halt, power-off, reboot, just write | |
107 | wall message.</para></listitem> | |
108 | </varlistentry> | |
109 | ||
110 | <varlistentry> | |
111 | <term><option>--no-wall</option></term> | |
112 | ||
113 | <listitem><para>Do not send wall | |
114 | message before | |
115 | halt, power-off, reboot.</para></listitem> | |
116 | </varlistentry> | |
117 | ||
118 | <varlistentry> | |
119 | <term><option>-c</option></term> | |
120 | ||
121 | <listitem><para>Cancel a pending shutdown. This may be used | |
fa44ceca | 122 | to cancel the effect of an invocation of |
798d3a52 ZJS |
123 | <command>shutdown</command> with a time argument that is not |
124 | <literal>+0</literal> or | |
125 | <literal>now</literal>.</para></listitem> | |
126 | </varlistentry> | |
127 | ||
a9c3cc8d LN |
128 | <varlistentry> |
129 | <term><option>--show</option></term> | |
130 | ||
131 | <listitem><para>Show a pending shutdown action and time if | |
132 | there is any.</para></listitem> | |
133 | </varlistentry> | |
134 | ||
798d3a52 ZJS |
135 | </variablelist> |
136 | </refsect1> | |
137 | ||
138 | <refsect1> | |
139 | <title>Exit status</title> | |
140 | ||
141 | <para>On success, 0 is returned, a non-zero failure code | |
142 | otherwise.</para> | |
143 | </refsect1> | |
144 | ||
145 | <refsect1> | |
146 | <title>See Also</title> | |
147 | <para> | |
148 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
149 | <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
150 | <citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>, | |
151 | <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
152 | </para> | |
153 | </refsect1> | |
160cd5c9 LP |
154 | |
155 | </refentry> |