📄 shutdown.8
字号:
.\" 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 NAMEshutdown \- close down the system.SH SYNOPSIS.nf.BR "shutdown [ \-h | \-r ] [ \-fqs ] [ now | " hh:ss " | " +mins " ] [ " message " ]".BR "reboot [ \-h | \-r ] [ \-fqs ] [ now | " hh:ss " | " +mins " ] [ " message " ]".BR "fastboot [ \-h | \-r ] [ \-fqs ] [ now | " hh:ss " | " +mins " ] [ " message " ]".BR "halt [ \-h | \-r ] [ \-fqs ] [ now | " hh:ss " | " +mins " ] [ " message " ]".BR "fasthalt [ \-h | \-r ] [ \-fqs ] [ now | " hh:ss " | " +mins " ] [ " message " ]".fi.SH DESCRIPTION.\" " for emacs hilit19In general,.B shutdownprepares the system for a power down or reboot. A absolute or delta timecan be given, and periodic messages will be sent to all users warning ofthe shutdown. If no message is specified on the command line,.B shutdownwill ask for a message to be sent, unless the .B \-qoption is set..B haltis the same as.B "shutdown -h -q now".B fasthaltis the same as.B "shutdown -h -q -f now".B rebootis the same as.B "shutdown -r -q now".B fastbootis 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 fiveminutes away), the.I /etc/nologinfile is created with a message stating that the system is going down andthat logins are no longer permitted. The.B login (1)program will not allow non-superusers to login during this period. Amessage will be sent to all users at this time.When the shutdown time arrives,.B shutdownnotifies all users, tells.BR init (8)not to spawn more.BR getty (8)'s,writes the shutdown time into the.I /var/log/wtmpfile, kills all other processes on the system,.BR sync (2)'s,unmounts all the disks,.BR sync (2)'sagain, waits for a second, and then either terminates or reboots thesystem.Prior to unmounting all discs, the \fBSIGQUIT\fP signal is sent to the\fBinit\fP process, which will in turn exec \fBshutdown\fP(8). Thisallows for clean unmounting, even if the old inode for the \fBinit\fPprocess was unlinked. If the current process ID (PID) equals 1, then\fBshutdown\fP(8) will pause forever..SH OPTIONS.TP.B \-hHalt the system. Do not reboot. This option is used when powering downthe system..TP.B \-rReboot the system..TP.B \-fFast. When the system is rebooted, the file systems will not be checked.This is arranged by creating.IR /fastboot ,which.I /etc/rcmust detect (and delete)..TP.B \-qQuiet. This uses a default broadcast message, and does not prompt the userfor one..TP.B \-sReboot 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 CONFIGThe configuration file \fI/etc/shutdown.conf\fP is used to determinethe action to take when halting the machine. The currently supportedfile format is extremely primitive. The first line must contain twostrings separated by whitespace. The first string must be\fBHALT_ACTION\fP and the second specifies the action you wish to takeon halt. The options allowed are:.TP.B haltThis will simply halt the system. This is the default behaviour.Note also that this is the fallback if another option fails..TP.B power_offThis will use the kernel power shutdown facility. This is usually onlyavailable on machines with Advanced Power Management (APM)..TP.I programnameThis specifies a command to run to shut down the power. The firstcharacter must be a "/". Bear in mind that this command will be runwith only the root filesystem mounted (and it will be read-only), andno daemons running..SH "SEE ALSO".BR umount (8),.BR login (1),.BR reboot (2),.BR simpleinit (8),.BR init (8).SH BUGSUnlike 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 AUTHORThis page documents the version of.B shutdownoriginally written by Peter Orbaek (poe@daimi.aau.dk).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -