Commit | Line | Data |
---|---|---|
7ead89cf KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
3c22338f | 5 | .\" @(#)shutdown.8 6.5 (Berkeley) %G% |
7ead89cf | 6 | .\" |
db21ad9e | 7 | .TH SHUTDOWN 8 "" |
7ead89cf KM |
8 | .UC 4 |
9 | .SH NAME | |
10 | shutdown \- close down the system at a given time | |
11 | .SH SYNOPSIS | |
12 | .B /etc/shutdown | |
13 | [ | |
3c22338f | 14 | .B \-fhkrn |
7ead89cf KM |
15 | ] |
16 | time [ warning-message ... ] | |
17 | .SH DESCRIPTION | |
18 | .I Shutdown | |
19 | provides an automated shutdown procedure which a super-user | |
3c22338f KB |
20 | can use to notify users nicely when the system is shutting down, |
21 | saving them from system administrators, hackers, and gurus, who | |
22 | would otherwise not bother with such niceties. | |
23 | .PP | |
7ead89cf | 24 | .I Time |
3c22338f KB |
25 | is the time at which \fIshutdown\fP will bring the system down and |
26 | may be the word \fInow\fP (indicating an immediate shutdown) or | |
27 | specify a future time in one of two formats: \fI+number\fP, or | |
28 | \fIyymmddhhmm\fP, where the year, month, and day may be defaulted | |
29 | to the current system values. The first form brings the system down in | |
30 | \fInumber\fP minutes and the second at the absolute time specified. | |
7ead89cf | 31 | .PP |
3c22338f KB |
32 | Any other arguments comprise the warning message that is broadcast |
33 | to users currently logged into the system; if no other arguments | |
34 | are provided, the warning message is read from the standard input. | |
7ead89cf | 35 | .PP |
3c22338f KB |
36 | At intervals, which get closer together as apocalypse approaches, |
37 | starting at ten hours before shutdown, warning messages are displayed | |
38 | at the terminals of all users on the system. Five minutes before | |
39 | shutdown, or immediately if shutdown is in less than 5 minutes, | |
40 | logins are disabled by creating \fI/etc/nologin\fP and copying the | |
41 | warning message there. If this file exists when a user attempts to | |
42 | log in, \fIlogin\fP(1) prints its contents and exits. The file is | |
43 | removed just before \fIshutdown\fP exits. | |
44 | .PP | |
45 | At shutdown time a message is written in the system log, containing the | |
46 | time of shutdown, who ran shutdown and the reason. Then a terminate | |
47 | signal is sent to \fIinit\fP to bring the system down to single-user state. | |
7ead89cf | 48 | Alternatively, if |
cccdca83 KM |
49 | .B \-r, |
50 | .B \-h, | |
7ead89cf | 51 | or |
cccdca83 | 52 | .B \-k |
3c22338f | 53 | is used, then |
7ead89cf KM |
54 | .I shutdown |
55 | will exec | |
56 | .IR reboot (8), | |
57 | .IR halt (8), | |
58 | or avoid shutting the system down (respectively). | |
59 | (If it isn't obvious, | |
60 | .B \-k | |
61 | is to make people | |
62 | .I think | |
63 | the system is going down!) | |
64 | .PP | |
a5bc296a JL |
65 | With the |
66 | .B \-f | |
67 | option, | |
68 | .I shutdown | |
69 | arranges, in the manner of | |
70 | .IR fastboot (8), | |
71 | that when the system is rebooted the file systems will not | |
72 | be checked. The | |
73 | .B \-n | |
74 | option prevents the normal | |
75 | .IR sync (2) | |
76 | before stopping. | |
77 | .PP | |
7ead89cf | 78 | The time of the shutdown and the warning message |
3c22338f | 79 | are placed in \fI/etc/nologin\fP and should be used to |
7ead89cf KM |
80 | inform the users about when the system will be back up |
81 | and why it is going down (or anything else). | |
82 | .SH FILES | |
3c22338f KB |
83 | .TP 15 |
84 | /etc/nologin | |
85 | tells login not to let anyone log in | |
86 | .TP 15 | |
87 | /fastboot | |
88 | tells /etc/rc not to run fsck when rebooting | |
7ead89cf | 89 | .SH "SEE ALSO" |
3c22338f KB |
90 | login(1), wall(1), fastboot(8), halt(8), reboot(8) |
91 | .SH "BACKWARD COMPATIBILITY" | |
92 | The hours and minutes in the second time format may be separated by | |
93 | a colon (``:'') for backward compatibility. | |
94 |