1.\" Copyright (c) 1988, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" %sccs.include.redist.man% 5.\" 6.\" @(#)shutdown.8 8.2 (Berkeley) 04/27/95 7.\" 8.Dd 9.Dt SHUTDOWN 8 10.Os BSD 4 11.Sh NAME 12.Nm shutdown 13.Nd "close down the system at a given time" 14.Sh SYNOPSIS 15.Nm shutdown 16.Op Fl 17.Op Fl fhkrn 18.Ar time 19.Op Ar warning-message ... 20.Sh DESCRIPTION 21.Nm Shutdown 22provides an automated shutdown procedure for super-users 23to nicely notify users when the system is shutting down, 24saving them from system administrators, hackers, and gurus, who 25would otherwise not bother with such niceties. 26.Pp 27Available friendlinesses: 28.Bl -tag -width time 29.It Fl f 30.Nm Shutdown 31arranges, in the manner of 32.Xr fastboot 8 , 33for the file systems 34.Em not to be 35checked on reboot. 36.It Fl h 37The system is halted at the specified 38.Ar time 39when 40.Nm shutdown 41execs 42.Xr halt 8 . 43.It Fl k 44Kick everybody off. 45The 46.Fl k 47option 48does not actually halt the system, but leaves the 49system multi-user with logins disabled (for all but super-user). 50.It Fl n 51Prevent the normal 52.Xr sync 2 53before stopping. 54.It Fl r 55.Nm Shutdown 56execs 57.Xr reboot 8 58at the specified 59.Ar time . 60.It Ar time 61.Ar Time 62is the time at which 63.Nm shutdown 64will bring the system down and 65may be the word 66.Ar now 67(indicating an immediate shutdown) or 68specify a future time in one of two formats: 69.Ar +number , 70or 71.Ar yymmddhhmm , 72where the year, month, and day may be defaulted 73to the current system values. The first form brings the system down in 74.Ar number 75minutes and the second at the absolute time specified. 76.It Ar warning-message 77Any other arguments comprise the warning message that is broadcast 78to users currently logged into the system. 79.It Fl 80If 81.Ql Fl 82is supplied as an option, the warning message is read from the standard 83input. 84.El 85.Pp 86At intervals, becoming more frequent as apocalypse approaches 87and starting at ten hours before shutdown, warning messages are displayed 88on the terminals of all users logged in. Five minutes before 89shutdown, or immediately if shutdown is in less than 5 minutes, 90logins are disabled by creating 91.Pa /etc/nologin 92and copying the 93warning message there. If this file exists when a user attempts to 94log in, 95.Xr login 1 96prints its contents and exits. The file is 97removed just before 98.Nm shutdown 99exits. 100.Pp 101At shutdown time a message is written in the system log, containing the 102time of shutdown, who initiated the shutdown and the reason. 103A terminate 104signal is then sent to 105.Xr init 106to bring the system down to single-user state (depending on above 107options). 108The time of the shutdown and the warning message 109are placed in 110.Pa /etc/nologin 111and should be used to 112inform the users about when the system will be back up 113and why it is going down (or anything else). 114.Sh FILES 115.Bl -tag -width /etc/nologin -compact 116.It Pa /etc/nologin 117tells login not to let anyone log in 118.It Pa /fastboot 119tells 120.Xr rc 8 121not to run fsck when rebooting 122.El 123.Sh SEE ALSO 124.Xr login 1 , 125.Xr wall 1 , 126.Xr fastboot 8 , 127.Xr halt 8 , 128.Xr reboot 8 129.Sh BACKWARD COMPATIBILITY 130The hours and minutes in the second time format may be separated by 131a colon (``:'') for backward compatibility. 132.Sh HISTORY 133The 134.Nm 135command appeared in 136.Bx 4.0 . 137