| 1 |
<?xml version='1.0'?> <!--*-nxml-*--> |
| 2 |
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
| 3 |
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> |
| 4 |
<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
| 5 |
|
| 6 |
<refentry id="poweroff" |
| 7 |
xmlns:xi="http://www.w3.org/2001/XInclude"> |
| 8 |
|
| 9 |
<refentryinfo> |
| 10 |
<title>poweroff</title> |
| 11 |
<productname>systemd</productname> |
| 12 |
</refentryinfo> |
| 13 |
|
| 14 |
<refmeta> |
| 15 |
<refentrytitle>poweroff</refentrytitle> |
| 16 |
<manvolnum>8</manvolnum> |
| 17 |
</refmeta> |
| 18 |
|
| 19 |
<refnamediv> |
| 20 |
<refname>poweroff</refname> |
| 21 |
<refname>reboot</refname> |
| 22 |
<refname>halt</refname> |
| 23 |
<refpurpose>Power off, reboot, or halt the machine</refpurpose> |
| 24 |
</refnamediv> |
| 25 |
|
| 26 |
<refsynopsisdiv> |
| 27 |
<cmdsynopsis> |
| 28 |
<command>poweroff</command> |
| 29 |
<arg choice="opt" rep="repeat">OPTIONS</arg> |
| 30 |
</cmdsynopsis> |
| 31 |
<cmdsynopsis> |
| 32 |
<command>reboot</command> |
| 33 |
<arg choice="opt" rep="repeat">OPTIONS</arg> |
| 34 |
</cmdsynopsis> |
| 35 |
<cmdsynopsis> |
| 36 |
<command>halt</command> |
| 37 |
<arg choice="opt" rep="repeat">OPTIONS</arg> |
| 38 |
</cmdsynopsis> |
| 39 |
</refsynopsisdiv> |
| 40 |
|
| 41 |
<refsect1> |
| 42 |
<title>Description</title> |
| 43 |
|
| 44 |
<para><command>poweroff</command>, <command>reboot</command>, and <command>halt</command> may be used to |
| 45 |
power off, reboot, or halt the machine. All three commands take the same options.</para> |
| 46 |
|
| 47 |
</refsect1> |
| 48 |
|
| 49 |
<refsect1> |
| 50 |
<title>Options</title> |
| 51 |
|
| 52 |
<para>The following options are understood:</para> |
| 53 |
|
| 54 |
<variablelist> |
| 55 |
<varlistentry> |
| 56 |
<term><option>--help</option></term> |
| 57 |
|
| 58 |
<listitem> |
| 59 |
<xi:include href="standard-options.xml" xpointer="help-para" /> |
| 60 |
|
| 61 |
<xi:include href="version-info.xml" xpointer="v253"/> |
| 62 |
</listitem> |
| 63 |
</varlistentry> |
| 64 |
|
| 65 |
<varlistentry> |
| 66 |
<term><option>--halt</option></term> |
| 67 |
|
| 68 |
<listitem><para>Halt the machine, regardless of which one of |
| 69 |
the three commands is invoked.</para> |
| 70 |
|
| 71 |
<xi:include href="version-info.xml" xpointer="v253"/></listitem> |
| 72 |
</varlistentry> |
| 73 |
|
| 74 |
<varlistentry> |
| 75 |
<term><option>-p</option></term> |
| 76 |
<term><option>--poweroff</option></term> |
| 77 |
|
| 78 |
<listitem><para>Power off the machine, when either <command>halt</command> |
| 79 |
or <command>poweroff</command> is invoked. This option is ignored when |
| 80 |
<command>reboot</command> is invoked.</para> |
| 81 |
|
| 82 |
<xi:include href="version-info.xml" xpointer="v253"/></listitem> |
| 83 |
</varlistentry> |
| 84 |
|
| 85 |
<varlistentry> |
| 86 |
<term><option>--reboot</option></term> |
| 87 |
|
| 88 |
<listitem><para>Reboot the machine, regardless of which one of |
| 89 |
the three commands is invoked.</para> |
| 90 |
|
| 91 |
<xi:include href="version-info.xml" xpointer="v253"/></listitem> |
| 92 |
</varlistentry> |
| 93 |
|
| 94 |
<varlistentry> |
| 95 |
<term><option>-f</option></term> |
| 96 |
<term><option>--force</option></term> |
| 97 |
|
| 98 |
<listitem> |
| 99 |
<para>Force immediate power-off, halt, or reboot. If specified, the command does not contact the |
| 100 |
init system. In most cases, filesystems are not properly unmounted before shutdown. For example, |
| 101 |
the command <command>reboot -f</command> is mostly equivalent to |
| 102 |
<command>systemctl reboot -ff</command>, instead of <command>systemctl reboot -f</command>. |
| 103 |
</para> |
| 104 |
|
| 105 |
<xi:include href="version-info.xml" xpointer="v253"/> |
| 106 |
</listitem> |
| 107 |
</varlistentry> |
| 108 |
|
| 109 |
<varlistentry> |
| 110 |
<term><option>-w</option></term> |
| 111 |
<term><option>--wtmp-only</option></term> |
| 112 |
|
| 113 |
<listitem><para>Only write wtmp shutdown entry, do not actually power off, reboot, or halt. |
| 114 |
</para> |
| 115 |
|
| 116 |
<xi:include href="version-info.xml" xpointer="v253"/></listitem> |
| 117 |
</varlistentry> |
| 118 |
|
| 119 |
<varlistentry> |
| 120 |
<term><option>-d</option></term> |
| 121 |
<term><option>--no-wtmp</option></term> |
| 122 |
|
| 123 |
<listitem><para>Do not write wtmp shutdown entry.</para> |
| 124 |
|
| 125 |
<xi:include href="version-info.xml" xpointer="v253"/></listitem> |
| 126 |
</varlistentry> |
| 127 |
|
| 128 |
<varlistentry> |
| 129 |
<term><option>-n</option></term> |
| 130 |
<term><option>--no-sync</option></term> |
| 131 |
|
| 132 |
<listitem><para>Do not sync hard disks/storage media before power-off, reboot, or halt. |
| 133 |
</para> |
| 134 |
|
| 135 |
<xi:include href="version-info.xml" xpointer="v253"/></listitem> |
| 136 |
</varlistentry> |
| 137 |
|
| 138 |
<varlistentry> |
| 139 |
<term><option>--no-wall</option></term> |
| 140 |
|
| 141 |
<listitem><para>Do not send wall message before power-off, reboot, or halt.</para> |
| 142 |
|
| 143 |
<xi:include href="version-info.xml" xpointer="v253"/></listitem> |
| 144 |
</varlistentry> |
| 145 |
</variablelist> |
| 146 |
</refsect1> |
| 147 |
|
| 148 |
<refsect1> |
| 149 |
<title>Exit status</title> |
| 150 |
|
| 151 |
<para>On success, 0 is returned, a non-zero failure code otherwise.</para> |
| 152 |
</refsect1> |
| 153 |
|
| 154 |
<refsect1> |
| 155 |
<title>Notes</title> |
| 156 |
|
| 157 |
<para>These commands are implemented in a way that preserves basic compatibility with the original SysV |
| 158 |
commands. <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
| 159 |
verbs <command>poweroff</command>, <command>reboot</command>, <command>halt</command> provide the same |
| 160 |
functionality with some additional features.</para> |
| 161 |
|
| 162 |
<para>Note that on many SysV systems <command>halt</command> used to be synonymous to |
| 163 |
<command>poweroff</command>, i.e. both commands would equally result in powering the machine off. systemd |
| 164 |
is more accurate here, and <command>halt</command> results in halting the machine only (leaving power |
| 165 |
on), and <command>poweroff</command> is required to actually power it off.</para> |
| 166 |
</refsect1> |
| 167 |
|
| 168 |
<refsect1> |
| 169 |
<title>See Also</title> |
| 170 |
<para><simplelist type="inline"> |
| 171 |
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 172 |
<member><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 173 |
<member><citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry></member> |
| 174 |
<member><citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 175 |
</simplelist></para> |
| 176 |
</refsect1> |
| 177 |
|
| 178 |
</refentry> |