161547Sbostic.\" Copyright (c) 1988, 1991, 1993 261547Sbostic.\" The Regents of the University of California. All rights reserved. 318923Smckusick.\" 443804Strent.\" %sccs.include.redist.man% 518923Smckusick.\" 6*68957Sbostic.\" @(#)shutdown.8 8.2 (Berkeley) 04/27/95 736433Sbostic.\" 847464Scael.Dd 947464Scael.Dt SHUTDOWN 8 1047464Scael.Os BSD 4 1147464Scael.Sh NAME 1247464Scael.Nm shutdown 1347464Scael.Nd "close down the system at a given time" 1447464Scael.Sh SYNOPSIS 1547464Scael.Nm shutdown 1647464Scael.Op Fl 1747464Scael.Op Fl fhkrn 1847464Scael.Ar time 1947464Scael.Op Ar warning-message ... 2047464Scael.Sh DESCRIPTION 2147464Scael.Nm Shutdown 2247464Scaelprovides an automated shutdown procedure for super-users 2347464Scaelto 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. 2647464Scael.Pp 2747464ScaelAvailable friendlinesses: 2847464Scael.Bl -tag -width time 2947464Scael.It Fl f 3047464Scael.Nm Shutdown 3147464Scaelarranges, in the manner of 3247464Scael.Xr fastboot 8 , 3347464Scaelfor the file systems 3447464Scael.Em not to be 3547464Scaelchecked on reboot. 3647464Scael.It Fl h 3747464ScaelThe system is halted at the specified 3847464Scael.Ar time 3947464Scaelwhen 4047464Scael.Nm shutdown 4147464Scaelexecs 4247464Scael.Xr halt 8 . 4347464Scael.It Fl k 44*68957SbosticKick everybody off. 4547464ScaelThe 4647464Scael.Fl k 4747464Scaeloption 4847464Scaeldoes not actually halt the system, but leaves the 4947464Scaelsystem multi-user with logins disabled (for all but super-user). 5047464Scael.It Fl n 5147464ScaelPrevent the normal 5247464Scael.Xr sync 2 5347464Scaelbefore stopping. 5447464Scael.It Fl r 5547464Scael.Nm Shutdown 5647464Scaelexecs 5747464Scael.Xr reboot 8 5847464Scaelat the specified 5947464Scael.Ar time . 6047464Scael.It Ar time 6147464Scael.Ar Time 6247464Scaelis the time at which 6347464Scael.Nm shutdown 6447464Scaelwill bring the system down and 6547464Scaelmay be the word 6647464Scael.Ar now 6747464Scael(indicating an immediate shutdown) or 6847464Scaelspecify a future time in one of two formats: 6947464Scael.Ar +number , 7047464Scaelor 7147464Scael.Ar yymmddhhmm , 7247464Scaelwhere the year, month, and day may be defaulted 7335527Sbosticto the current system values. The first form brings the system down in 7447464Scael.Ar number 7547464Scaelminutes and the second at the absolute time specified. 7647464Scael.It Ar warning-message 7735527SbosticAny other arguments comprise the warning message that is broadcast 7847464Scaelto users currently logged into the system. 7947464Scael.It Fl 8047464ScaelIf 8147464Scael.Ql Fl 8236433Sbosticis supplied as an option, the warning message is read from the standard 8336433Sbosticinput. 8447464Scael.El 8547464Scael.Pp 8647464ScaelAt intervals, becoming more frequent as apocalypse approaches 8747464Scaeland starting at ten hours before shutdown, warning messages are displayed 8847464Scaelon the terminals of all users logged in. Five minutes before 8935527Sbosticshutdown, or immediately if shutdown is in less than 5 minutes, 9047464Scaellogins are disabled by creating 9147464Scael.Pa /etc/nologin 9247464Scaeland copying the 9335527Sbosticwarning message there. If this file exists when a user attempts to 9447464Scaellog in, 9547464Scael.Xr login 1 9647464Scaelprints its contents and exits. The file is 9747464Scaelremoved just before 9847464Scael.Nm shutdown 9947464Scaelexits. 10047464Scael.Pp 10135527SbosticAt shutdown time a message is written in the system log, containing the 10247464Scaeltime of shutdown, who initiated the shutdown and the reason. 10347464ScaelA terminate 10447464Scaelsignal is then sent to 10547464Scael.Xr init 10647464Scaelto bring the system down to single-user state (depending on above 10747464Scaeloptions). 10818923SmckusickThe time of the shutdown and the warning message 10947464Scaelare placed in 11047464Scael.Pa /etc/nologin 11147464Scaeland should be used to 11218923Smckusickinform the users about when the system will be back up 11318923Smckusickand why it is going down (or anything else). 11447464Scael.Sh FILES 11547464Scael.Bl -tag -width /etc/nologin -compact 11647464Scael.It Pa /etc/nologin 11735527Sbostictells login not to let anyone log in 11847464Scael.It Pa /fastboot 11947464Scaeltells 12047464Scael.Xr rc 8 12147464Scaelnot to run fsck when rebooting 12247464Scael.El 12347464Scael.Sh SEE ALSO 12447464Scael.Xr login 1 , 12547464Scael.Xr wall 1 , 12647464Scael.Xr fastboot 8 , 12747464Scael.Xr halt 8 , 12847464Scael.Xr reboot 8 12947464Scael.Sh BACKWARD COMPATIBILITY 13035527SbosticThe hours and minutes in the second time format may be separated by 13135527Sbostica colon (``:'') for backward compatibility. 13247464Scael.Sh HISTORY 13347464ScaelThe 13447464Scael.Nm 13547464Scaelcommand appeared in 13647464Scael.Bx 4.0 . 137