One time reboot of Linux (Ubuntu)


If you occasionally need to reboot a Linux box as a one off one evening you can perform the following commands using the at command. Note if you set a time that has just past it will perform the reboot the following day. So lets say its 16:15 and you want to schedule a reboot at 21:00 that evening, to do this you can do run these commands.

# at 21:00

at> shutdown -r now

Hit Ctrl + D

You’ll now see its been created:

job 1 at Tue Nov 3 21:00:00 2015

To check on any at commands that are scheduled you can run:

# atq

1 Tue Nov 3 21:00:00 2015 a root

Leave a Reply

Your email address will not be published. Required fields are marked *