Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

login(1)

wall(1)

halt(8)

opser(8)

reboot(8)

rwalld(8c)

shutdown(8)

Name

shutdown − close down the system at a given time

Syntax

/etc/shutdown [ −k ] [ −r ] [ −h ] [ −o ] time [ warning-message ... ]

Description

The shutdown command provides an automated shutdown procedure that a superuser can use to notify users when the system is shutting down.

The time is the time at which shutdown will bring the system down. It may be the word ‘now’, indicating an immediate shutdown, or specify a future time in one of two formats: + number or hour : min.  The first form brings the system down in number minutes.  The second brings the system down at the time of day indicated, using a 24−hour clock format. 

At intervals which get shorter as shutdown nears, warning messages are displayed at the terminals of all users on the system.  Warning messages are also sent to users who are logged in to a remote system that has mounted a file system or directory from the local system using NFS.  Five minutes before shutdown, or immediately if shutdown is timed for less than five minutes, logins are disabled by creating /etc/nologin and writing a message there. If this file exists when a user attempts to log in, login() prints its contents and exits. The file is removed just before shutdown exits.

At shutdown time, a message is written in the file /usr/adm/shutdownlog. This message contains the time of shutdown, who ran shutdown, and the reason. Then, a terminate signal is sent at init to bring the system to single-user state.

If the −r, −h, or −k options are used, then shutdown executes reboot(,), halt(,), or avoids shutting the system down (respectively). The −o option is for use by opser only.  It indicates to shutdown that it is being called by opser and not to return to the user.

You should place the time of the shutdown and the warning message in /etc/nologin. Use the message to inform the users about when the system will be back up and why it is going down.

Restrictions

You can kill the system only between now and 23:59, if you use the absolute time for shutdown. 

Files

/etc/nologin
Tells login not to let anyone log in

/usr/adm/shutdownlog
Log file for successful shutdowns

See Also

login(1), wall(1), halt(8), opser(8), reboot(8), rwalld(8c)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026