Linux shutdown command - Shutdown or reboot the Linux system

shutdown command: Shutdown or reboot the Linux system

shutdown command Function Description

Use the shutdown command to safely shut down or restart your Linux system.

By using the shutdown command before the system is shut down, the system administrator will notify a warning message to all logged-in users that the system will be shut down and the login process will be frozen, i.e. new users will not be able to log in again.

A direct shutdown or a delay of a certain amount of time before shutting down is possible, as well as a reboot.

The shutdown command also allows the user to specify a time parameter, which can be either a precise time or a time period from the present. The format of the precise time is hh:mm for hours and minutes, and the time period is represented by a "+" and a number of minutes.

shutdown command Syntax

shutdown [Option] [Time] [Warning Message] 

Option Meaning

The meanings of the options in the command are shown below.

Option Description
-k It doesn’t perform a shutdown, it just sends a warning message to all users
-r Reboot the system
-h Shutdown System
-c Cancel running shutdown

shutdown command Demo

Shut down the computer system immediately

[root@deepinout ~]# shutdown -h now

Shutting down the computer system after a timer of 45 minutes

[root@deepinout ~]# shutdown -h +45
Broadcast message from root@rhel     (/dev/pts/1) at 1:08 ...
The system is going down for halt in 45 minutes!

Reboot the computer system immediately with a warning message

[root@deepinout ~]# shutdown -r now "system will be reboot now."
Broadcast message from root@rhel     (/dev/pts/1) at 1:08 ...
The system is going down for reboot NOW!
system will be reboot now. 

Timed restart of computer system at 1:38

[root@deepinout ~]# shutdown -r 01:38
Broadcast message from root@rhel     (/dev/pts/0) at 1:37 ...
The system is going down for reboot in 1 minute!
Like(0)
Linux Login Logout Command
Linux login commandLinux logout commandLinux nologin commandLinux exit commandLinux sulogin commandLinux rlogin commandLinux poweroff commandLinux ctrlaltdel CommandLinux shutdown commandLinux halt commandLinux reboot commandLinux init commandLinux runlevel commandLinux telinit command
Linux File Management Command
Linux cat commandLinux tac commandLinux nl commandLinux more commandLinux less commandLinux head commandLinux tail commandLinux rev commandLinux fold commandLinux fmt commandLinux expand commandLinux pr commandLinux sort commandLinux uniq commandLinux cut commandLinux comm commandLinux diff commandLinux join commandLinux diff3 commandLinux cmp commandLinux colrm commandLinux paste commandLinux mkdir commandLinux tr commandLinux split commandLinux csplit commandLinux tee commandLinux unexpand commandLinux patch commandLinux awk commandLinux sed commandLinux od commandLinux pwd commandLinux cd commandLinux ls commandLinux dir commandLinux dirs commandLinux touch commandLinux rmdir commandLinux cp commandLinux mv commandLinux rm commandLinux install commandLinux tmpwatch commandLinux file commandLinux du commandLinux wc commandLinux tree commandLinux cksum commandLinux md5sum commandLinux sum commandLinux dirname commandLinux mkfifo Command
Cron Expressions
Cron Expression to Run Every Day at 12 PMUnderstanding Vue Cron ExpressionsUnderstanding JS Cron ExpressionsA Comprehensive Guide to Cron Expressions for Scheduled TasksUnderstanding Linux Cron ExpressionsUnderstanding Quartz Cron ExpressionsCron ExpressionCron Time ExpressionCron Expression ParsingCron Expression: Executing a Task Every SecondCron Expression for Every Minute ExecutionCron Expression to Execute Every 10 MinutesCron Expression: Executing Every HourCron Expression to Execute Once a YearCron Expression: How to Schedule a Task to Run Daily at Midnight?