How to schedule your Ubuntu system to poweroff?


There are a lot of ways in Linux using which you can power off your system or schedule your system to power off at a specified time. Scheduling a systems power-off can be very useful in situations such as system updates is in progress and you want to shutdown it once the update is completed.

In this article, you will see different ways to schedule your Ubuntu system to power off.

Prerequisites

You need to have sudo permissions in order to shut down or restart a system.

How to power off a Ubuntu system

The easiest way to shut down a system is by using Ubuntu GUI. You simply need to click on the power off button which is given on the right-hand upper corner of your Ubuntu screen. This will display the dropdown menu here click on Power Off.

poweroff button Ubuntu

Alternatively, you can run the following command in your terminal to power off your system.

sudo poweroff

OR if you are login as the root user then simply run –

poweroff

Scheduling Ubuntu system to power off at a specified time

You can use the shutdown command to schedule your Ubuntu system to power off at a specified time in the future. The usage of this command is given below.

Poweroff system immediately

By using the given command you can immediately turn off your Ubuntu system. Make sure to run these commands as a root user or with sudo privilege.

shutdown now

To shut down your system let’s say at 5:45 PM then you need to run the shutdown command in the following way –

shutdown 17:45

You can also shut down a system 40 minutes from now by using –

shutdown +40

To cancel a scheduled power off run the following command in your terminal –

shutdown -c

For more information on how to use the shutdown command in Linux run the following command in your terminal –

man shutdown

This will display the user manual of the shutdown command.

Conclusion

I hope now you are now able to schedule your Ubuntu system to power off at a specified time. You can use the poweroff or shutdown commands on different distributions of Linux.

Now if you have a query or feedback the write us in the comments below.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.