1*47464Scael.\" Copyright (c) 1988, 1991 The Regents of the University of California. 236433Sbostic.\" All rights reserved. 318923Smckusick.\" 443804Strent.\" %sccs.include.redist.man% 518923Smckusick.\" 6*47464Scael.\" @(#)shutdown.8 6.8 (Berkeley) 03/16/91 736433Sbostic.\" 8*47464Scael.Dd 9*47464Scael.Dt SHUTDOWN 8 10*47464Scael.Os BSD 4 11*47464Scael.Sh NAME 12*47464Scael.Nm shutdown 13*47464Scael.Nd "close down the system at a given time" 14*47464Scael.Sh SYNOPSIS 15*47464Scael.Nm shutdown 16*47464Scael.Op Fl 17*47464Scael.Op Fl fhkrn 18*47464Scael.Ar time 19*47464Scael.Op Ar warning-message ... 20*47464Scael.Sh DESCRIPTION 21*47464Scael.Nm Shutdown 22*47464Scaelprovides an automated shutdown procedure for super-users 23*47464Scaelto nicely notify users when the system is shutting down, 2435527Sbosticsaving them from system administrators, hackers, and gurus, who 2535527Sbosticwould otherwise not bother with such niceties. 26*47464Scael.Pp 27*47464ScaelAvailable friendlinesses: 28*47464Scael.Bl -tag -width time 29*47464Scael.It Fl f 30*47464Scael.Nm Shutdown 31*47464Scaelarranges, in the manner of 32*47464Scael.Xr fastboot 8 , 33*47464Scaelfor the file systems 34*47464Scael.Em not to be 35*47464Scaelchecked on reboot. 36*47464Scael.It Fl h 37*47464ScaelThe system is halted at the specified 38*47464Scael.Ar time 39*47464Scaelwhen 40*47464Scael.Nm shutdown 41*47464Scaelexecs 42*47464Scael.Xr halt 8 . 43*47464Scael.It Fl k 44*47464ScaelKick every body off. 45*47464ScaelThe 46*47464Scael.Fl k 47*47464Scaeloption 48*47464Scaeldoes not actually halt the system, but leaves the 49*47464Scaelsystem multi-user with logins disabled (for all but super-user). 50*47464Scael.It Fl n 51*47464ScaelPrevent the normal 52*47464Scael.Xr sync 2 53*47464Scaelbefore stopping. 54*47464Scael.It Fl r 55*47464Scael.Nm Shutdown 56*47464Scaelexecs 57*47464Scael.Xr reboot 8 58*47464Scaelat the specified 59*47464Scael.Ar time . 60*47464Scael.It Ar time 61*47464Scael.Ar Time 62*47464Scaelis the time at which 63*47464Scael.Nm shutdown 64*47464Scaelwill bring the system down and 65*47464Scaelmay be the word 66*47464Scael.Ar now 67*47464Scael(indicating an immediate shutdown) or 68*47464Scaelspecify a future time in one of two formats: 69*47464Scael.Ar +number , 70*47464Scaelor 71*47464Scael.Ar yymmddhhmm , 72*47464Scaelwhere the year, month, and day may be defaulted 7335527Sbosticto the current system values. The first form brings the system down in 74*47464Scael.Ar number 75*47464Scaelminutes and the second at the absolute time specified. 76*47464Scael.It Ar warning-message 7735527SbosticAny other arguments comprise the warning message that is broadcast 78*47464Scaelto users currently logged into the system. 79*47464Scael.It Fl 80*47464ScaelIf 81*47464Scael.Ql Fl 8236433Sbosticis supplied as an option, the warning message is read from the standard 8336433Sbosticinput. 84*47464Scael.El 85*47464Scael.Pp 86*47464ScaelAt intervals, becoming more frequent as apocalypse approaches 87*47464Scaeland starting at ten hours before shutdown, warning messages are displayed 88*47464Scaelon the terminals of all users logged in. Five minutes before 8935527Sbosticshutdown, or immediately if shutdown is in less than 5 minutes, 90*47464Scaellogins are disabled by creating 91*47464Scael.Pa /etc/nologin 92*47464Scaeland copying the 9335527Sbosticwarning message there. If this file exists when a user attempts to 94*47464Scaellog in, 95*47464Scael.Xr login 1 96*47464Scaelprints its contents and exits. The file is 97*47464Scaelremoved just before 98*47464Scael.Nm shutdown 99*47464Scaelexits. 100*47464Scael.Pp 10135527SbosticAt shutdown time a message is written in the system log, containing the 102*47464Scaeltime of shutdown, who initiated the shutdown and the reason. 103*47464ScaelA terminate 104*47464Scaelsignal is then sent to 105*47464Scael.Xr init 106*47464Scaelto bring the system down to single-user state (depending on above 107*47464Scaeloptions). 10818923SmckusickThe time of the shutdown and the warning message 109*47464Scaelare placed in 110*47464Scael.Pa /etc/nologin 111*47464Scaeland should be used to 11218923Smckusickinform the users about when the system will be back up 11318923Smckusickand why it is going down (or anything else). 114*47464Scael.Sh FILES 115*47464Scael.Bl -tag -width /etc/nologin -compact 116*47464Scael.It Pa /etc/nologin 11735527Sbostictells login not to let anyone log in 118*47464Scael.It Pa /fastboot 119*47464Scaeltells 120*47464Scael.Xr rc 8 121*47464Scaelnot to run fsck when rebooting 122*47464Scael.El 123*47464Scael.Sh SEE ALSO 124*47464Scael.Xr login 1 , 125*47464Scael.Xr wall 1 , 126*47464Scael.Xr fastboot 8 , 127*47464Scael.Xr halt 8 , 128*47464Scael.Xr reboot 8 129*47464Scael.Sh BACKWARD COMPATIBILITY 13035527SbosticThe hours and minutes in the second time format may be separated by 13135527Sbostica colon (``:'') for backward compatibility. 132*47464Scael.Sh HISTORY 133*47464ScaelThe 134*47464Scael.Nm 135*47464Scaelcommand appeared in 136*47464Scael.Bx 4.0 . 137