How to restart or reboot the Linux system at a specified time of the day?

December 30, 2022 - 2 min read

To restart or reboot the Linux system at a specified time of the day, you can use the shutdown Linux command followed by the -r flag (the -r flag refers to rebooting the system at a specified time) and finally the time of the day to restart in 24-hour format.

TL;DR

#  reboot the system at 13:00 (1 pm) time
sudo shutdown -r 13:00

For example, let's say we have to restart or reboot the system at 1 pm the afternoon. To do we can use the shutdown Linux command followed by the -r flag (reboot flag) followed by the time to stop the system in 24-hour format. In our case, we can write 13:00 since it is the 24-hour format of 1 pm.

NOTE: To convert 12 hr format time to 24-hour format, add 12 to the 12-hour format time. Eg: 1 pm is 1 + 12 = 13 in 24-hour format.

The command looks like this,

# reboot the system at 13:00 (1 pm) time
shutdown -r 13:00

If you are not a super user of the system, you cannot execute the above command.

To execute the above command as a super user, you can add the sudo command before the shutdown command like this,

# reboot the system at 13:00 (1 pm) time
sudo shutdown -r 13:00

After executing the above command, you will see an output similar to below,

As you can see from the above screenshot we have successfully scheduled the reboot time for the system.

That's all 😃.