SHUTDOWN(8)SHUTDOWN(8)NAMEshutdown - close down the system at a given time
SYNOPSISshutdown [ - ] [ -fhkrn ] time [ warning-message ... ]
DESCRIPTION
Shutdown provides an automated shutdown procedure which a super-user
can use to notify users nicely when the system is shutting down, saving
them from system administrators, hackers, and gurus, who would other‐
wise not bother with such niceties.
Time is the time at which shutdown will bring the system down and may
be the word now (indicating an immediate shutdown) or specify a future
time in one of two formats: +number, or yymmddhhmm, where the year,
month, and day may be defaulted to the current system values. The
first form brings the system down in number minutes and the second at
the absolute time specified.
Any other arguments comprise the warning message that is broadcast to
users currently logged into the system; if a single dash (``-'') is
supplied as an option, the warning message is read from the standard
input.
At intervals, which get closer together as apocalypse approaches,
starting at ten hours before shutdown, warning messages are displayed
at the terminals of all users on the system. Five minutes before shut‐
down, or immediately if shutdown is in less than 5 minutes, logins are
disabled by creating /etc/nologin and copying the warning message
there. If this file exists when a user attempts to log in, login(1)
prints its contents and exits. The file is removed just before shut‐
down exits.
At shutdown time a message is written in the system log, containing the
time of shutdown, who ran shutdown and the reason. Then a terminate
signal is sent to init to bring the system down to single-user state.
Alternatively, if -r, -h, or -k is used, then shutdown will exec
reboot(8), halt(8), or avoid shutting the system down (respectively).
(If it isn't obvious, -k is to make people think the system is going
down!)
With the -f option, shutdown arranges, in the manner of fastboot(8),
that when the system is rebooted the file systems will not be checked.
The -n option prevents the normal sync(2) before stopping.
The time of the shutdown and the warning message are placed in
/etc/nologin and should be used to inform the users about when the sys‐
tem will be back up and why it is going down (or anything else).
FILES
/etc/nologin tells login not to let anyone log in
/fastboot tells /etc/rc not to run fsck when rebooting
SEE ALSOlogin(1), wall(1), fastboot(8), halt(8), reboot(8)BACKWARD COMPATIBILITY
The hours and minutes in the second time format may be separated by a
colon (``:'') for backward compatibility.
4th Berkeley Distribution June 24, 1990 SHUTDOWN(8)