How to shutdown the system at a specified time?

The time argument can have two different formats. It can be an absolute time in the format hh:mm and relative time in the format +m where m is the number of minutes from now.

  • The following example will schedule a system shutdown at 05 A.M:
sudo shutdown 05:00

  • The following example will schedule a system shutdown in 20 minutes from now:
sudo shutdown +20

How to shutdown the system immediately?

  • To shutdown your system immediately you can use +0 or its alias now:
sudo shutdown now

How to broadcast a custom message?

  • The following command will shut down the system in 10 minutes from now and notify the users with message “System upgrade”:
sudo shutdown +10 "System upgrade"

  • It is important to mention that when specifying a custom wall message you must specify a time argument too.

How to halt your system?

  • This can be achieved using the -H option with the shutdown command:
shutdown -H
  • Halting means stopping all CPUs and powering off also makes sure the main power is disconnected.

How to make shutdown power-off machine?

  • Although this is by default, you can still use the -P option to explicitly specify that you want shutdown to power off the system.
shutdown -P

How to reboot using shutdown?

  • For reboot, the option -r is used with shutdown for exection:
shutdown -r
  • You can also specify a time argument and a custom message:
shutdown -r +5 "Updating Your System"
  • The command above will reboot the system after 5 minutes and broadcast Updating Your System”.

How to cancel a scheduled shutdown?

  • If you have scheduled a shutdown and you want to cancel it you can use the -c argument:
sudo shutdown -c
  • When canceling a scheduled shutdown, you cannot specify a time argument, but you can still broadcast a message that will be sent to all users.
sudo shutdown -c "Canceling the reboot"

shutdown command in Linux with Examples

The `shutdown` operation in Linux is a crucial command for managing system power states, allowing administrators to halt safely, power off, or reboot the system. This command provides flexibility in scheduling downtimes, ensuring minimal disruption to users and processes. In this article, we will explore the `shutdown` command with practical examples, illustrating how to use its various options to control system behavior effectively.

Table of Content

  • What is a Shutdown in Linux?
  • How to use shutdown?
  • How to shutdown the system at a specified time?
  • Linux Shutdown – FAQs

Similar Reads

What is a Shutdown in Linux?

The shutdown command in Linux is used to shut down the system safely. You can shut down the machine immediately, or schedule a shutdown using 24 hour format. It brings the system down in a secure way. When the shutdown is initiated, all logged-in users and processes are notified that the system is going down, and no further logins are allowed. Only root user can execute shutdown command....

How to use shutdown?

The shutdown command in Linux is used to halt, power off, or reboot the system. It can be scheduled or executed immediately, providing flexibility in managing system downtime....

How to shutdown the system at a specified time?

The time argument can have two different formats. It can be an absolute time in the format hh:mm and relative time in the format +m where m is the number of minutes from now....

Linux Shutdown – FAQs

What is the shutdown command for Linux?...