2 .\" Copyright (c) 2001 Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH SHUTDOWN 1M "May 9, 2001"
9 shutdown \- shut down system, change system state
13 \fB/usr/sbin/shutdown\fR [\fB-y\fR] [\fB-g\fR \fIgrace-period\fR] [\fB-i\fR \fIinit-state\fR]
20 \fBshutdown\fR is executed by the super user to change the state of the
21 machine. In most cases, it is used to change from the multi-user state (state
25 By default, \fBshutdown\fR brings the system to a state where only the console
26 has access to the operating system. This state is called single-user.
29 Before starting to shut down daemons and killing processes, \fBshutdown\fR
30 sends a warning message and, by default, a final message asking for
31 confirmation. \fImessage\fR is a string that is sent out following the standard
32 warning message "The system will be shut down in .\|.\|." If the string
33 contains more than one word, it should be contained within single (\fB\&'\fR)
34 or double (\fB"\fR) quotation marks.
37 The warning message and the user provided \fImessage\fR are output when there
38 are 7200, 3600, 1800, 1200, 600, 300, 120, 60, and 30 seconds remaining before
39 \fBshutdown\fR begins. See \fBEXAMPLES\fR.
42 System state definitions are:
49 Stop the operating system.
58 State 1 is referred to as the administrative state. In state 1 file systems
59 required for multi-user operations are mounted, and logins requiring access to
60 multi-user file systems can be used. When the system comes up from firmware
61 mode into state 1, only the console is active and other multi-user (state 2)
62 services are unavailable. Note that not all user processes are stopped when
63 transitioning from multi-user state to state 1.
72 State s (or S) is referred to as the single-user state. All user processes are
73 stopped on transitions to this state. In the single-user state, file systems
74 required for multi-user logins are unmounted and the system can only be
75 accessed through the console. Logins requiring access to multi-user file
76 systems cannot be used.
85 Shut the machine down so that it is safe to remove the power. Have the machine
86 remove power, if possible. The \fBrc0\fR procedure is called to perform this
96 Stop the operating system and reboot to the state defined by the
97 \fBinitdefault\fR entry in \fB/etc/inittab\fR. The \fBrc6\fR procedure is
98 called to perform this task.
108 Pre-answer the confirmation question so the command can be run without user
115 \fB\fB-g\fR\fI grace-period\fR\fR
118 Allow the super user to change the number of seconds from the 60-second
125 \fB\fB-i\fR\fI init-state\fR\fR
128 If there are warnings, \fIinit-state\fR specifies the state \fBinit\fR is to be
129 in. By default, system state `\fBs\fR' is used.
134 \fBExample 1 \fRUsing \fBshutdown\fR
137 In the following example, \fBshutdown\fR is being executed on host \fBfoo\fR
138 and is scheduled in 120 seconds. The warning message is output 2 minutes, 1
139 minute, and 30 seconds before the final confirmation message.
144 example# shutdown -i S -g 120 "===== disk replacement ====="
145 Shutdown started. Tue Jun 7 14:51:40 PDT 1994
147 Broadcast Message from root (pts/1) on foo Tue Jun 7 14:51:41.\|.\|.
148 The system will be shut down in 2 minutes
149 ===== disk replacement =====
150 Broadcast Message from root (pts/1) on foo Tue Jun 7 14:52:41.\|.\|.
151 The system will be shut down in 1 minutes
152 ===== disk replacement =====
153 Broadcast Message from root (pts/1) on foo Tue Jun 7 14:53:41.\|.\|.
154 The system will be shut down in 30 seconds
155 ===== disk replacement =====
156 Do you want to continue? (y or n):
165 \fB\fB/etc/inittab\fR\fR
168 controls process dispatching by \fBinit\fR
174 \fBboot\fR(1M), \fBhalt\fR(1M), \fBinit\fR(1M), \fBkillall\fR(1M),
175 \fBreboot\fR(1M), \fBufsdump\fR(1M), \fBinit.d\fR(4), \fBinittab\fR(4),
176 \fBnologin\fR(4), \fBattributes\fR(5)
180 When a system transitions down to the \fBS\fR or \fBs\fR state, the
181 \fB/etc/nologin\fR file (see \fBnologin\fR(4)) is created. Upon subsequent
182 transition to state 2 (multi-user state), this file is removed by a script in
183 the \fB/etc/rc2.d\fR directory.