Reboot an Ubuntu system from the command line

Question:
How to reboot an Ubuntu system from the command line?

To reboot an Ubuntu system from the command line, you can use the following commands:

1. Reboot Immediately:

sudo reboot

This will restart your system immediately.

2. Reboot After a Delay:

If you want to schedule a reboot after a delay (e.g., after 5 minutes), you can use:

sudo shutdown -r +5

This will reboot the system in 5 minutes. You can adjust the +5 to any number of minutes you'd like.

3. Reboot at a Specific Time:

You can also specify a specific time for the reboot. For example, to reboot at 10:30 PM:

sudo shutdown -r 22:30

4. Cancel a Scheduled Reboot:

If you’ve scheduled a reboot but want to cancel it, you can run:

sudo shutdown -c

 

Taxonomy: