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