]>
Commit | Line | Data |
---|---|---|
160cd5c9 | 1 | <?xml version='1.0'?> <!--*-nxml-*--> |
3a54a157 | 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
eea10b26 | 3 | "http://www.oasis-open.org/docbook/xml/4.5/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> | |
5ee38ade | 21 | <refpurpose>Halt, power off or reboot the machine</refpurpose> |
798d3a52 ZJS |
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 | ||
5ee38ade | 36 | <para><command>shutdown</command> may be used to halt, power off, or reboot the machine.</para> |
798d3a52 ZJS |
37 | |
38 | <para>The first argument may be a time string (which is usually | |
39 | <literal>now</literal>). Optionally, this may be followed by a | |
40 | wall message to be sent to all logged-in users before going | |
41 | down.</para> | |
42 | ||
43 | <para>The time string may either be in the format | |
44 | <literal>hh:mm</literal> for hour/minutes specifying the time to | |
45 | execute the shutdown at, specified in 24h clock format. | |
46 | Alternatively it may be in the syntax <literal>+m</literal> | |
47 | referring to the specified number of minutes m from now. | |
48 | <literal>now</literal> is an alias for <literal>+0</literal>, i.e. | |
49 | for triggering an immediate shutdown. If no time argument is | |
50 | specified, <literal>+1</literal> is implied.</para> | |
51 | ||
52 | <para>Note that to specify a wall message you must specify a time | |
53 | argument, too.</para> | |
54 | ||
55 | <para>If the time argument is used, 5 minutes before the system | |
56 | goes down the <filename>/run/nologin</filename> file is created to | |
57 | ensure that further logins shall not be allowed.</para> | |
58 | </refsect1> | |
59 | ||
60 | <refsect1> | |
61 | <title>Options</title> | |
62 | ||
63 | <para>The following options are understood:</para> | |
64 | ||
65 | <variablelist> | |
66 | <varlistentry> | |
67 | <term><option>--help</option></term> | |
68 | ||
69 | <xi:include href="standard-options.xml" xpointer="help-text" /> | |
70 | </varlistentry> | |
71 | ||
72 | <varlistentry> | |
73 | <term><option>-H</option></term> | |
74 | <term><option>--halt</option></term> | |
75 | ||
76 | <listitem><para>Halt the machine.</para></listitem> | |
77 | </varlistentry> | |
78 | ||
79 | <varlistentry> | |
80 | <term><option>-P</option></term> | |
81 | <term><option>--poweroff</option></term> | |
82 | ||
5ee38ade | 83 | <listitem><para>Power the machine off (the default).</para></listitem> |
798d3a52 ZJS |
84 | </varlistentry> |
85 | ||
86 | <varlistentry> | |
87 | <term><option>-r</option></term> | |
88 | <term><option>--reboot</option></term> | |
89 | ||
5ee38ade | 90 | <listitem><para>Reboot the machine.</para></listitem> |
798d3a52 ZJS |
91 | </varlistentry> |
92 | ||
93 | <varlistentry> | |
94 | <term><option>-h</option></term> | |
95 | ||
5ee38ade ZJS |
96 | <listitem><para>The same as <option>--poweroff</option>, but does not override the action to take if |
97 | it is "halt". E.g. <command>shutdown --reboot -h</command> means "poweroff", but <command>shutdown | |
98 | --halt -h</command> means "halt".</para></listitem> | |
798d3a52 ZJS |
99 | </varlistentry> |
100 | ||
101 | <varlistentry> | |
102 | <term><option>-k</option></term> | |
103 | ||
5ee38ade | 104 | <listitem><para>Do not halt, power off, or reboot, but just write the wall message.</para></listitem> |
798d3a52 ZJS |
105 | </varlistentry> |
106 | ||
107 | <varlistentry> | |
108 | <term><option>--no-wall</option></term> | |
109 | ||
5ee38ade | 110 | <listitem><para>Do not send wall message before halt, power off, or reboot.</para></listitem> |
798d3a52 ZJS |
111 | </varlistentry> |
112 | ||
113 | <varlistentry> | |
114 | <term><option>-c</option></term> | |
115 | ||
5ee38ade ZJS |
116 | <listitem><para>Cancel a pending shutdown. This may be used to cancel the effect of an invocation of |
117 | <command>shutdown</command> with a time argument that is not <literal>+0</literal> or | |
798d3a52 ZJS |
118 | <literal>now</literal>.</para></listitem> |
119 | </varlistentry> | |
120 | ||
a9c3cc8d LN |
121 | <varlistentry> |
122 | <term><option>--show</option></term> | |
123 | ||
124 | <listitem><para>Show a pending shutdown action and time if | |
ec07c3c8 AK |
125 | there is any.</para> |
126 | ||
127 | <xi:include href="version-info.xml" xpointer="v250"/></listitem> | |
a9c3cc8d LN |
128 | </varlistentry> |
129 | ||
798d3a52 ZJS |
130 | </variablelist> |
131 | </refsect1> | |
132 | ||
133 | <refsect1> | |
134 | <title>Exit status</title> | |
135 | ||
136 | <para>On success, 0 is returned, a non-zero failure code | |
137 | otherwise.</para> | |
138 | </refsect1> | |
139 | ||
9aafd310 | 140 | <refsect1> |
141 | <title>Compatibility</title> | |
142 | ||
143 | <para>The <command> shutdown</command> command in previous init systems (including sysvinit) defaulted to | |
144 | single-user mode instead of powering off the machine. To change into single-user mode, use | |
145 | <command>systemctl rescue</command> instead.</para> | |
146 | </refsect1> | |
147 | ||
798d3a52 ZJS |
148 | <refsect1> |
149 | <title>See Also</title> | |
13a69c12 DT |
150 | <para><simplelist type="inline"> |
151 | <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> | |
152 | <member><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> | |
153 | <member><citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> | |
154 | <member><citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> | |
155 | </simplelist></para> | |
798d3a52 | 156 | </refsect1> |
160cd5c9 LP |
157 | |
158 | </refentry> |