Linux Shutdown and Reboot Command Tutorial with Examples

Shutting down the Linux systems can be done in different ways. We can use provided GUI like KDE, GNOME, Unity ect. to shutdown system. But what will we do if we have only console access to the system. We can use shutdown command to shutdown and reboot system.

Syntax

1

shutdown[OPTIONS...][TIME][MESSAGE...]

Shutdown System

We can use shutdown command without providing any option or parameter to simply shutdown the system. We need required privileges like root to shutdown a linux system.

1

$shutdown

Shutdown At Specified Time

Sometimes we need more time before shutting down the system. We can provide some interval before the shutdown command take effect with the time value

In this example we will shutdown the system after 5 minutes now.

1

$shutdown-h5

Restart System

We can restart the Linux system with shutdown command. This will first shutdown system and then restart. We should provide -r option which means restart.

1

$shutdown-r

Restart At Specified Time

We can also restart the system at specified time. We will use -r option again by adding the interval value we want to wait. In this example we want to restart the system after 10 minutes.

1

$shutdown-r10

Skip File System Check (fsck) at Reboot

Linux operating systems generally check a file system at start if there is some problems. This file system check may take some time. We can skip this file system check with -f option.

1

$shutdown-r-f

Send Message To System Users

Linux operating system is designed to work multi user. At given time there may be more than one user connected to the Linux system. Shutting down will interrupt their connection and work too. We can send some message with shutdown command. As stated in syntax the message it the last part of the shutdown command.