SHUTDOWN(8)
SHUTDOWN(8) π
okay bestie, welcome to the GNU/Linux System Adminstrator's manual page for shutdown, and honestly? this one's a baddie. it's the little program that puts your whole system to sleep (or wakes it back up). let's get into it π«Ά
β¨ NAME β¨
shutdown, reboot, poweroff β poweroff or reboot the system π
πΈ SYNOPSIS πΈ
/usr/sbin/shutdown [-h] [-r] [-f] [-F] [now]
/usr/sbin/reboot [-w] [-f] [-n]
/usr/sbin/halt [-w] [-f] [-n]
/usr/sbin/poweroff [-w] [-f] [-n]
look at her. four names, one icon π
π¦ DESCRIPTION π¦
So Shutdown is a program to poweroff or reboot the system, and the whole point of it is that it maintains some compatibility with the original SysV-init halt, poweroff, reboot and shutdown programs. Why does that matter? Because some initscripts, graphical desktop environments and tools like acpi literally expect these programs to exist. it's giving "we keep the old friends around" π
When it's called as shutdown, halt or poweroff with no options, runit(8) is told to shutdown the system and poweroff. bye bye β¨
When it's called as reboot, runit(8) is told to reboot the system. hi again π
And when runit(8) is not the current init system, this program sends data in the appropriate format to perform the requested action to the initctl pipe, if it exists. flexible queen.
π SHUTDOWN OPTIONS π
-hβ Shutdown the system and poweroff; this is the default. Actually this option is ignored and can be omitted, it is maintained only for backward compatibility with Sysv'sshutdown. (not me keeping an option around purely for the nostalgia π)-rβ Reboot the system instead of poweroff. π₯-fβ Write a/fastbootflag file. The program or the scripts responsible for the system boot task can test for this file when the system comes up again and decide to skipfsck. The program or the scripts that perform the boot task also need to take care of the removal of the flag file. (yes bestie, cleanup is your job, not hers π )-Fβ Write a/forcefsckflag file. The program or the scripts responsible for the system boot task can test for this file when the system comes up again and decide to runfsckwith a'force'flag. The program or the scripts that perform the boot task also need to take care of the removal of the flag file.
ngl the vibes here are "I will leave you a note, you deal with the rest" and honestly? iconic.
The original Sysv shutdown implementation required a time parameter for shutdown and allowed for an optional shutdown message. The runit shutdown program does not support extra arguments after the options; if a time parameter other than 'now' is given, shutdown will exit with an error. β οΈ
To retain compatibility with acpi, -H, -P flags and shutdown messages are ignored and shutdown will continue without errors (see #1087001). periodt, no drama π
π HALT OPTIONS π
-fβ Invokesync(), then force an unsafe reboot or poweroff immediately without signaling the init system. This will likely result in an unclean shutdown and can cause data loss or corruption. π Whenrunitis init, this option is a No-Op and all other options are ignored. See#899246.
bestie. hear me. this one is lowkey dangerous. data loss is not a vibe. do not be casual with -f. π
--forceβ Invokesync(), then force an unsafe reboot or poweroff immediately without signaling the init system. This will likely result in an unclean shutdown and can cause data loss or corruption. This option works regardless of the running init system. (same chaos, but she shows up no matter what init you're running π«Ά)-w,--wtmp-onlyβ Try to write a shutdownwtmpentry inwtmpdb(8)database; if/usr/bin/wtmpdbprogram is not found or not executable, a warning is printed instead.-nβ Write a/etc/runit/nosyncflag file. If this file existsrunitdoes not invokesync()before reboot or poweroff. The/etc/runit/nosyncflag file is also checked when this program is called with-for--force.
Any other option given is ignored except that a warning is printed. π
π SWITCHING FORM OTHER INIT SYSTEMS π
(yes the section is called "FORM", we don't fix it, we respect her π)
This program maintains a compatibility layer with SysV-init's initctl pipe according to the spec described in SysV-init's initctl(5). This allow one to reboot the system when switching from another init to runit-init.
Currently only switching from systemd and SysV-init is tested but any other init system that maintains an initctl pipe compatible with SysV's one should work. no cap β¨
π BUGS π
Combining flags, like halt -wf is not supported, all merged short options will be ignored.
so don't try to be cute and smash them together, she will simply pretend you didn't π
π SEE ALSO π
and that's the whole page, bestie!! π¦ written by the GNU/Linux System Adminstrator's manual girlies, dated August 30, 2022. go forth, reboot responsibly, and always signal your init system π β¨π
π¦ where this page comes from
- debian trixie: runit 2.2.0-3 Β· BSD-3-Clause
- ubuntu questing: runit 2.2.0-4ubuntu1
- ubuntu resolute: runit 2.3.0-1ubuntu1 Β· BSD-3-Clause
- ubuntu stonking: runit 2.3.1-5ubuntu1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms