ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding This file is part of systemd.
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding Copyright 2010 Lennart Poettering
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding systemd is free software; you can redistribute it and/or modify it
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding under the terms of the GNU Lesser General Public License as published by
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding the Free Software Foundation; either version 2.1 of the License, or
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding (at your option) any later version.
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding systemd is distributed in the hope that it will be useful, but
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding WITHOUT ANY WARRANTY; without even the implied warranty of
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding Lesser General Public License for more details.
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding You should have received a copy of the GNU Lesser General Public License
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding along with systemd; If not, see <http://www.gnu.org/licenses/>.
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding <refentryinfo>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding <authorgroup>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding </authorgroup>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding </refentryinfo>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding <refnamediv>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <refpurpose>Halt, power-off or reboot the machine</refpurpose>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding </refnamediv>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding <refsynopsisdiv>
ab2c1c1c83ec91415565da5a71fbc15d9685caa6fielding <cmdsynopsis>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding </cmdsynopsis>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding </refsynopsisdiv>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <para><command>shutdown</command> may be used to halt, power-off
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding or reboot the machine.</para>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <para>The first argument may be a time string (which is usually
dc80439e9fba60c753cd145cb6799409ffea9b71ronald <literal>now</literal>). Optionally, this may be followed by a
dc80439e9fba60c753cd145cb6799409ffea9b71ronald wall message to be sent to all logged-in users before going
dc80439e9fba60c753cd145cb6799409ffea9b71ronald down.</para>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <para>The time string may either be in the format
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <literal>hh:mm</literal> for hour/minutes specifying the time to
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding execute the shutdown at, specified in 24h clock format.
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding Alternatively it may be in the syntax <literal>+m</literal>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding referring to the specified number of minutes m from now.
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <literal>now</literal> is an alias for <literal>+0</literal>, i.e.
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding for triggering an immediate shutdown. If no time argument is
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding specified, <literal>+1</literal> is implied.</para>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <para>Note that to specify a wall message you must specify a time
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding argument, too.</para>
dc80439e9fba60c753cd145cb6799409ffea9b71ronald <para>If the time argument is used, 5 minutes before the system
dc80439e9fba60c753cd145cb6799409ffea9b71ronald goes down the <filename>/run/nologin</filename> file is created to
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding ensure that further logins shall not be allowed.</para>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding </refsect1>
dc80439e9fba60c753cd145cb6799409ffea9b71ronald <variablelist>
dc80439e9fba60c753cd145cb6799409ffea9b71ronald <varlistentry>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <xi:include href="standard-options.xml" xpointer="help-text" />
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding </varlistentry>
c7d0205ec1649076e7742d72a25ac53779768312stoddard <varlistentry>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <listitem><para>Halt the machine.</para></listitem>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding </varlistentry>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <varlistentry>
694e8dc146faadc46b2455f3bd0998121fc76c5drbb </varlistentry>
c7d0205ec1649076e7742d72a25ac53779768312stoddard <varlistentry>
8ec8f1c8f0f37ca3f5ebb0e0b491dd07481dccbfronald </varlistentry>
8ec8f1c8f0f37ca3f5ebb0e0b491dd07481dccbfronald <varlistentry>
8ec8f1c8f0f37ca3f5ebb0e0b491dd07481dccbfronald <listitem><para>Equivalent to <option>--poweroff</option>,
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm unless <option>--halt</option> is specified.</para></listitem>
8ec8f1c8f0f37ca3f5ebb0e0b491dd07481dccbfronald </varlistentry>
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm <varlistentry>
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm <listitem><para>Do not halt, power-off, reboot, just write
8ec8f1c8f0f37ca3f5ebb0e0b491dd07481dccbfronald </varlistentry>
8ec8f1c8f0f37ca3f5ebb0e0b491dd07481dccbfronald <varlistentry>
8ec8f1c8f0f37ca3f5ebb0e0b491dd07481dccbfronald message before
8ec8f1c8f0f37ca3f5ebb0e0b491dd07481dccbfronald </varlistentry>
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm <varlistentry>
1ccd992d37d62c8cb2056126f2234f64ec189bfddougm <listitem><para>Cancel a pending shutdown. This may be used
8ec8f1c8f0f37ca3f5ebb0e0b491dd07481dccbfronald cancel the effect of an invocation of
8ec8f1c8f0f37ca3f5ebb0e0b491dd07481dccbfronald <command>shutdown</command> with a time argument that is not
8ec8f1c8f0f37ca3f5ebb0e0b491dd07481dccbfronald </varlistentry>
8ec8f1c8f0f37ca3f5ebb0e0b491dd07481dccbfronald </variablelist>
8ec8f1c8f0f37ca3f5ebb0e0b491dd07481dccbfronald </refsect1>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <para>On success, 0 is returned, a non-zero failure code
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding otherwise.</para>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding </refsect1>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <citerefentry><refentrytitle>halt</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding <citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
0f081398cf0eef8cc7c66a535d450110a92dc8aefielding </refsect1>