September 20, 2025
Linux Command Line

Linux Command Line

The “shutdown” command in Linux is used to schedule the power-off or reboot of a Linux system. It is a powerful command that allows users to schedule shutdowns or reboots for a specific time or after a certain period of time has passed. In this article, we will discuss when to use the “shutdown” command, how to use it, and provide some examples of its usage.

When to use the “shutdown” command:

The “shutdown” command is useful in a number of scenarios. For example, you might want to use it to schedule a system shutdown or reboot during off-hours to perform maintenance or updates. It can also be used to shut down a system in case of an emergency or to save power.

How to use the “shutdown” command:

The “shutdown” command can be used in the following format: shutdown [options] time [message]
The options flag can be used to specify whether the system should be shut down or rebooted.

Some of the commonly used options are:

-h : to shut down the system
-r : to reboot the system
-c : to cancel a scheduled shutdown
-k : to send a warning message to all logged-in users but do not actually perform a shutdown.

The time flag can be used to specify the time when the shutdown or reboot should occur. It can be given in the format “HH:MM” for a specific time or “+m” for a time after m minutes.

The message flag can be used to specify a message that will be displayed to all logged-in users before the shutdown or reboot occurs.

Examples:

Here are some examples of how the “shutdown” command can be used:

  1. To shut down the system immediately: shutdown -h now
  2. To reboot the system in 15 minutes: shutdown -r +15 “System reboot in 15 minutes for updates”
  3. To schedule a shutdown for 10 PM: shutdown -h 22:00 “System shutting down for maintenance”

In this article, we have discussed the “shutdown” command in Linux and its usage. The “shutdown” command is a powerful tool that allows users to schedule system shutdowns or reboots for a specific time or after a certain period of time has passed. It is a useful command that can be used in a number of scenarios such as maintenance, emergency, or power saving. With the understanding of the command and the examples discussed, you should now be able to use this command efficiently.

See our list of 75 Linux commands you should know about.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
Share via
Copy link
Powered by Social Snap