.\" Copyright 1992 Rickard E. Faith (faith@cs.unc.edu) .\" May be distributed under the GNU General Public License .\" .\" .TH SHUTDOWN 8 "2 March 2000" "Linux 2.0" "Linux Programmer's Manual" .SH NAME shutdown \- close down the system .SH SYNOPSIS .B shutdown .RB [ \-h | \-r ] .RB [ \-fqs ] .RB [ now | \fIhh\fP:\fIss\fP | +\fImins\fP ] .RI [ message ] .br .B reboot .RB [ \-h | \-r ] .RB [ \-fqs ] .RB [ now | \fIhh\fP:\fIss\fP | +\fImins\fP ] .RI [ message ] .br .B fastboot .RB [ \-h | \-r ] .RB [ \-fqs ] .RB [ now | \fIhh\fP:\fIss\fP | +\fImins\fP ] .RI [ message ] .br .B halt .RB [ \-h | \-r ] .RB [ \-fqs ] .RB [ now | \fIhh\fP:\fIss\fP | +\fImins\fP ] .RI [ message ] .br .B fasthalt .RB [ \-h | \-r ] .RB [ \-fqs ] .RB [ now | \fIhh\fP:\fIss\fP | +\fImins\fP ] .RI [ message ] .SH DESCRIPTION .\" " for emacs hilit19 In general, .B shutdown prepares the system for a power down or reboot. A absolute or delta time can be given, and periodic messages will be sent to all users warning of the shutdown. If no message is specified on the command line, .B shutdown will ask for a message to be sent, unless the .B \-q option is set. .B halt is the same as .B "shutdown -h -q now" .B fasthalt is the same as .B "shutdown -h -q -f now" .B reboot is the same as .B "shutdown -r -q now" .B fastboot is the same as .B "shutdown -r -q -f now" The default delta time, if none is specified, is 2 minutes. Five minutes before shutdown (or immediately, if shutdown is less than five minutes away), the .I /etc/nologin file is created with a message stating that the system is going down and that logins are no longer permitted. The .BR login (1) program will not allow non-superusers to login during this period. A message will be sent to all users at this time. When the shutdown time arrives, .B shutdown notifies all users, tells .BR init (8) not to spawn more .BR getty (8)'s, writes the shutdown time into the .I /var/log/wtmp file, kills all other processes on the system, .BR sync (2)'s, unmounts all the disks, .BR sync (2)'s again, waits for a second, and then either terminates or reboots the system. Prior to unmounting all discs, the \fBSIGQUIT\fP signal is sent to the \fBinit\fP process, which will in turn exec \fBshutdown\fP(8). This allows for clean unmounting, even if the old inode for the \fBinit\fP process was unlinked. If the current process ID (PID) equals 1, then \fBshutdown\fP(8) will pause forever. .SH OPTIONS .TP .B \-h Halt the system. Do not reboot. This option is used when powering down the system. .TP .B \-r Reboot the system. .TP .B \-f Fast. When the system is rebooted, the file systems will not be checked. This is arranged by creating .IR /fastboot , which .I /etc/rc must detect (and delete). .TP .B \-q Quiet. This uses a default broadcast message, and does not prompt the user for one. .TP .B \-s Reboot in single user mode. This is arranged by creating .IR /etc/singleboot , which .BR simpleinit (8) detects (and deletes). .SH FILES .nf .I /etc/rc .I /fastboot .I /etc/singleboot .I /etc/nologin .I /var/log/wtmp .I /etc/shutdown.conf .fi .SH CONFIG The configuration file \fI/etc/shutdown.conf\fP is used to determine the action to take when halting the machine. The currently supported file format is extremely primitive. The first line must contain two strings separated by whitespace. The first string must be \fBHALT_ACTION\fP and the second specifies the action you wish to take on halt. The options allowed are: .TP .B halt This will simply halt the system. This is the default behaviour. Note also that this is the fallback if another option fails. .TP .B power_off This will use the kernel power shutdown facility. This is usually only available on machines with Advanced Power Management (APM). .TP .I programname This specifies a command to run to shut down the power. The first character must be a "/". Bear in mind that this command will be run with only the root filesystem mounted (and it will be read-only), and no daemons running. .SH "SEE ALSO" .BR umount (8), .BR login (1), .BR reboot (2), .BR simpleinit (8), .BR init (8) .SH BUGS Unlike the BSD .BR shutdown , users are notified of shutdown only once or twice, instead of many times, and at shorter and shorter intervals as "apocalypse approaches." Some would construe this as a feature. .SH AUTHOR This page documents the version of .B shutdown originally written by Peter Orbaek (poe@daimi.aau.dk).