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