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 | .\" | |
3060f563 | 5 | .\" @(#)shutdown.8 6.4 (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 | [ | |
14 | .B \-k | |
15 | ] [ | |
16 | .B \-r | |
17 | ] [ | |
18 | .B \-h | |
a5bc296a JL |
19 | ] [ |
20 | .B \-f | |
21 | ] [ | |
22 | .B \-n | |
7ead89cf KM |
23 | ] |
24 | time [ warning-message ... ] | |
25 | .SH DESCRIPTION | |
26 | .I Shutdown | |
27 | provides an automated shutdown procedure which a super-user | |
28 | can use to notify users | |
29 | nicely when the system is shutting down, saving them from | |
30 | system administrators, hackers, and gurus, who would otherwise | |
31 | not bother with niceties. | |
32 | .LP | |
33 | .I Time | |
34 | is the time at which | |
35 | .I shutdown | |
36 | will bring the system down and | |
cccdca83 KM |
37 | may be the word |
38 | .B now | |
39 | (indicating an immediate shutdown) | |
40 | or specify a future time in one of two formats: | |
7ead89cf KM |
41 | .BR + number |
42 | and | |
43 | .RB hour : min. | |
44 | The first form brings the system down in | |
45 | .I number | |
46 | minutes | |
47 | and the second brings the system down at the time of day indicated | |
48 | (as a 24\-hour clock). | |
49 | .PP | |
50 | At intervals which get closer together as apocalypse approaches, | |
51 | warning messages are displayed at the terminals of all users on the | |
52 | system. Five minutes before shutdown, or immediately if | |
53 | shutdown is in less than 5 minutes, logins are disabled by | |
54 | creating | |
55 | /etc/nologin | |
56 | and writing a message there. | |
cccdca83 | 57 | If this file exists when a user attempts to log in, |
7ead89cf KM |
58 | .IR login (1) |
59 | prints its contents | |
60 | and exits. | |
61 | The file is removed just before | |
62 | .I shutdown | |
63 | exits. | |
64 | .PP | |
65 | At shutdown time a | |
8c0a4ae7 | 66 | message is written in the system log, containing the |
7ead89cf | 67 | time of shutdown, who ran shutdown and the reason. |
3060f563 | 68 | Then a terminate signal is sent to |
7ead89cf KM |
69 | .I init |
70 | to bring the system down to single-user state. | |
71 | Alternatively, if | |
cccdca83 KM |
72 | .B \-r, |
73 | .B \-h, | |
7ead89cf | 74 | or |
cccdca83 | 75 | .B \-k |
7ead89cf KM |
76 | was used, then |
77 | .I shutdown | |
78 | will exec | |
79 | .IR reboot (8), | |
80 | .IR halt (8), | |
81 | or avoid shutting the system down (respectively). | |
82 | (If it isn't obvious, | |
83 | .B \-k | |
84 | is to make people | |
85 | .I think | |
86 | the system is going down!) | |
87 | .PP | |
a5bc296a JL |
88 | With the |
89 | .B \-f | |
90 | option, | |
91 | .I shutdown | |
92 | arranges, in the manner of | |
93 | .IR fastboot (8), | |
94 | that when the system is rebooted the file systems will not | |
95 | be checked. The | |
96 | .B \-n | |
97 | option prevents the normal | |
98 | .IR sync (2) | |
99 | before stopping. | |
100 | .PP | |
7ead89cf KM |
101 | The time of the shutdown and the warning message |
102 | are placed in /etc/nologin and should be used to | |
103 | inform the users about when the system will be back up | |
104 | and why it is going down (or anything else). | |
105 | .SH FILES | |
106 | .DT | |
107 | /etc/nologin tells login not to let anyone log in | |
7ead89cf | 108 | .SH "SEE ALSO" |
a5bc296a | 109 | login(1), reboot(8), fastboot(8) |
7ead89cf KM |
110 | .SH BUGS |
111 | Only allows you to kill the system between now and 23:59 if | |
112 | you use the absolute time for shutdown. |