Schedule Ubuntu Shutdown With This Simple Command

While there are plenty of tools that allow you to schedule your Ubuntu to shutdown at a specified time, here is an inbuilt command that you can use to automate the shutdown of your computer. It will save you the effort of installing third party software too.

Open a terminal and type:

sudo shutdown -h now

This will shutdown the computer immediately.

sudo shutdown -h 16:05

The computer will shutdown at 4.05pm.

sudo shutdown -h +5

The computer will shutdown 5 minutes from now.

If you want it to restart instead of shutdown, use the “-r” flag instead. For example:

sudo shutdown -r now

Isn’t that easy?


Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox