Category: Ubuntu

Added: 30th of October 2020

Viewed: 670 times

Shutdown Ubuntu and Ubuntu based distributions at a specific time or within (x) minutes

This tutorial works in Ubunbu, Kubuntu, Xubuntu, Lubuntu, Ubuntu Mate and other Ubuntu based distributions. The tutorial also works in Linux Mint and other Debian based distributions.

I never realised the shutdown command extended further, where you can specify a time to shutdown or shutdown the system in (x) amount of minutes.

To shutdown your system at a specific time, it must be entered the following format HH:MM

So to shutdown your system at Two Twenty PM in the afternoon we enter the following command

sudo shutdown 14:20


To shutdown your system after (x) amount of minutes, it must be entered in the following format +m

So to shutdown the system after 20 Minutes enter the following command
sudo shutdown +20


You can also add a message when the shutdown command is initiated, for example shutting down
sudo shutdown +20 "Shutting Down....."


To reboot your system at Ten PM in the evening we enter the following command
sudo shutdown -r 22:00 "Rebooting..."


You could create a cron job to reboot your system once a month, once a week, once a day and so on. Cron jobs are discussed in my other tutorial, which can be found here

To cancel a scheduled shutdown or reboot of your system, you can use the following command
sudo shutdown -c

Other Tips & Tutorials

Ubuntu

How do I upgrade a single package in Ubuntu and Ubuntu based distributions

Posted: 12th of September 2021

Views: 248

Ubuntu

Create a multiboot USB for your .iso images, using Ventoy on Linux

Posted: 25th of August 2021

Views: 340

Ubuntu

How to find out what date you installed Linux on your machine

Posted: 13th of April 2021

Views: 476

Ubuntu

Install bashtop in Ubuntu and Ubuntu based distributions. Monitor your cpu, memory, disks, network and other processes

Posted: 21st of February 2021

Views: 587

Ubuntu

Ubuntu 20.10 Groovy Gorilla installation error, installer crashed

Posted: 3rd of February 2021

Views: 972

Ubuntu

Find out what version of Ubuntu you are running, using the terminal

Posted: 29th of January 2021

Views: 483

Ubuntu

Install Redshift to automatically adjust the colour of your screen depending on time of day on Ubuntu and Ubuntu based distributions

Posted: 26th of November 2020

Views: 1078

Ubuntu

PulseAudio, Pavucontrol not saving settings after reboot on Ubuntu and Ubuntu based distributions

Posted: 11th of November 2020

Views: 3752

Ubuntu

No sound after installation of Ubuntu or Ubuntu based distribution, install pavucontrol

Posted: 9th of November 2020

Views: 585

Ubuntu

Shutdown Ubuntu and Ubuntu based distributions at a specific time or within (x) minutes

Posted: 30th of October 2020

Views: 670