shutdown -- terminate all processing


/etc/shutdown [ -y ] [ -g[hh:]mm ] [ -i[0156sS] ] [ -f``mesg'' ] [ -ffile ] [ su ]


The primary function of shutdown is to terminate all currently running processes in an orderly and cautious manner. shutdown goes through the following steps:

  1. All users logged on the system are notified to log off the system by a broadcast message.

  2. /etc/init is called to perform the actual shutdown.
Only root can run the shutdown command directly. A user possessing the shutdown subsystem authorization can shut down the system using the asroot command:

/tcb/bin/asroot shutdown

shutdown takes the following options:

file is the pathname of a file containing a message to be sent to all terminals warning of the imminent shutdown during the grace period.

mesg is a message enclosed in a pair of double quotes ("") to be sent to all terminals warning of the imminent shutdown during the grace period.

Specifies the number of hours and minutes before shutdown (maximum: 72 hours). 1 minute is the default. (To shut down the system immediately without a grace period, use /etc/haltsys or /etc/reboot. Note that these commands should not be used if NFS, TCP/IP or certain other services are running.)

Specifies the init level to bring the system to (see init(M)). By default, the system is brought to level 0.

Runs the command silently. If this option is not specified, shutdown will prompt for confirmation to shut down the system.
The optional su argument lets the system go single-user without completely shutting it down. (This option is identical to -i1 and is present for backwards compatibility with XENIX).

Broadcast messages, whether default or defined, are displayed at regular intervals during the grace period. The closer the shutdown time, the more frequent the message.

Time left until shutdown Frequency of message
Greater than 1 hour Every hour
Greater than 15 minutes Every 15 minutes
Less than 15 minutes Every minute

 |Time left until shutdown | Frequency of message        |
 |Greater than 1 hour      | Every hour                  |
 |Greater than 15 minutes  | Every 15 minutes            |
 |Less than 15 minutes     | Every minute                |
In general, if no options are specified, shutdown behaves as follows:

  1. prompt for confirmation

  2. 60-second grace period

  3. bring the system to init level 0

  4. broadcast default message prior to shutdown


The most common error diagnostic that will occur is ``device busy''. This diagnostic appears when a particular filesystem could not be unmounted. See mount(ADM).


Once shutdown has been invoked, it must be allowed to run to completion and must not be interrupted by pressing <Break> or <Del>.

shutdown does not work when executed from within a shell layer.

shutdown locks the hard disk heads.

See also

asroot(ADM), boot(HW), init(M), wall(ADM)

Standards conformance

shutdown is not part of any currently supported standard; it was developed at the University of California, Berkeley, and is used with permission.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 03 June 2005