O'Reilly logo

Linux Pocket Guide, 2nd Edition by Daniel J. Barrett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

shutdown — stdin  stdout  - file  -- opt  --help  --version

Synopsis

shutdown [options] time [message]

The shutdown command halts or reboots a Linux system; only the superuser may run it. Here’s a command to halt the system in 10 minutes, broadcasting the message “scheduled maintenance” to all users logged in:

# shutdown -h +10 "scheduled maintenance"

The time may be a number of minutes preceded by a plus sign, like +10; an absolute time in hours and minutes, like 16:25; or the word now to mean immediately.

With no options, shutdown puts the system into single-user mode, a special maintenance mode in which only one person is logged in (at the system console), and all nonessential services are off. To exit single-user mode, either perform another shutdown to halt or reboot, or type ^D to bring up the system in normal, multiuser mode.

Useful options

-r

Reboot the system.

-h

Halt the system.

-k

Kidding: don’t really perform a shutdown, just broadcast warning messages to all users as if the system were going down.

-c

Cancel a shutdown in progress (omit the time argument).

-f

On reboot, skip the usual filesystem check performed by the fsck program (described in Disks and Filesystems).

-F

On reboot, require the usual filesystem check.

For technical information about shutdowns, single-user mode, and various system states, see the manpages for init and inittab.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required