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