Category: Ubuntu

Added: 30th of October 2020

Viewed: 280 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 to find out what date you installed Linux on your machine

Posted: 13th of April 2021

Views: 55

Ubuntu

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

Posted: 21st of February 2021

Views: 142

Ubuntu

Ubuntu 20.10 Groovy Gorilla installation error, installer crashed

Posted: 3rd of February 2021

Views: 339

Ubuntu

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

Posted: 29th of January 2021

Views: 174

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: 385

Ubuntu

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

Posted: 11th of November 2020

Views: 1398

Ubuntu

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

Posted: 9th of November 2020

Views: 246

Ubuntu

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

Posted: 30th of October 2020

Views: 280

Ubuntu

Open and edit files using Visual Studio Code from FIlezilla FTP Client on Linux

Posted: 27th of October 2020

Views: 1828

Ubuntu

Download Microsoft Edge preview version for Ubuntu and Ubuntu based distributions

Posted: 22nd of October 2020

Views: 332