| SHUTDOWN(8) | System Manager's Manual | SHUTDOWN(8) |
NAME
shutdown — close
down the system at a given time
SYNOPSIS
shutdown |
[-] [-h |
-p | -r |
-k] [-o
[-n]] time
[warning-message ...] |
shutdown |
-C |
DESCRIPTION
The shutdown utility takes the system down
at time, warning its users beforehand. It waits in the
background, recording its process ID in
/var/run/shutdown.pid. Warnings go to the system
console at 10, 5 and 2 hours, 1 hour, 45, 30, 20, 15, 10, 5, 3, 2 and 1
minutes, and 30 seconds before the time, together with
warning-message. Five minutes before, it creates
/etc/nologin, after which
login(1) refuses users other than the
superuser.
At time it asks
init(8) to stop the system: to reboot
with -r, halt with -h, power
off with -p, and with none of them, to take the
system to single-user mode.
The options are as follows:
-- Read the warning message from the standard input, after any given on the command line.
-C- Cancel the pending shutdown.
-h- Halt the system.
-k- Warn users and disable logins, but do not stop the system. /etc/nologin is left in place.
-n- With
-o, do not synchronize the file systems. -o- Run reboot(8)
-qinstead of asking init(8), so no services are stopped. Requires-h,-por-r. -p- Power the system off.
-r- Reboot the system.
time is one of:
now- Immediately.
+minutes- That many minutes from now.
- hh
:mm - Today at that time.
- [[[[[cc]yy]mm]dd]hh]mm
- An absolute time; omitted fields keep their current values, and a two-digit year below 69 is in the 21st century.
A time in the past is an error. Only one shutdown may be pending;
sending it SIGINT or
SIGTERM, as -C does, cancels
it and removes /etc/nologin. Only the superuser may
use shutdown.
FILES
- /etc/nologin
- tells login(1) not to admit users
- /var/run/shutdown.pid
- the pending shutdown
EXIT STATUS
The shutdown utility exits 0 on
success, and >0 if an error occurs.
EXAMPLES
Reboot in 10 minutes, then change your mind:
# shutdown -r +10 "installing a new kernel" # shutdown -C
SEE ALSO
HISTORY
A shutdown utility appeared in
4.0BSD. This implementation was written for
OxideBSD. The -C option is OxideBSD's;
-c remains reserved for power cycling, as in
FreeBSD, which OxideBSD does not support.
| September 25, 2026 | OxideBSD |