shutdown

Name

shutdown -- bring the system down

Synopsis

/sbin/shutdown [-t sec] [-arkhcfF] time [warning-message]

Description

shutdown brings the system down in a secure way. All logged-in users are notified that the system is going down, and login(1) is blocked. It is possible to shut the system down immediately or after a specified delay. All processes are first notified that the system is going down by the signal SIGTERM.

Standard Options

-a

Use /etc/shutdown.allow

-t sec

Tell init(8) to wait sec seconds between sending processes the warning and the kill signal, before changing to another runlevel.

-k

Don't really shutdown; only send the warning messages to everybody.

-r

Reboot after shutdown

-h

Halt after shutdown

-f

Skip fsck on reboot

-F

Force fsck on reboot

-c

Cancel an already running shutdown. With this option it is of course not possible to give the time argument, but you can enter a explanatory message on the command line that will be sent to all users.

time

When to shutdown

The time argument can have different formats. First, it can be an absolute time in the hh:mm, in which hh is the hour (1 or 2 digits) and mm is the minute of the hour (in two digits). Second, it can be in the +m, in which m is the number of minutes to wait. The word now is an alias for +0.

If shutdown is called with a delay, it creates the advisory file /etc/nologin which causes programs such as login(1) to not allow new user logins. Shutdown only removes this file if it is stopped before it can signal init (i.e. it is cancelled or something goes wrong). Otherwise it is the responsibility of the system shutdown or startup scripts to remove this file so that users can login.

warning-message

Message to send all users.