Category: Ubuntu

Added: 30th of October 2020

Viewed: 154 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

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

Ubuntu

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

Posted: 11th of November 2020

Views: 438

Ubuntu

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

Posted: 9th of November 2020

Views: 140

Ubuntu

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

Posted: 30th of October 2020

Views: 154

Ubuntu

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

Posted: 27th of October 2020

Views: 292

Ubuntu

Download Microsoft Edge preview version for Ubuntu and Ubuntu based distributions

Posted: 22nd of October 2020

Views: 206

Ubuntu

Create a really simple banner using GIMP (GNU Image Manipulation Program) in Linux

Posted: 7th of August 2020

Views: 317

Ubuntu

Install the tree package to list folders and files in a tree like format inside the terminal on Linux

Posted: 22nd of July 2020

Views: 299

Ubuntu

Ubuntu 4.10, Warty Warthog. The first Ubuntu Linux Distribution

Posted: 6th of October 2019

Views: 1241

Ubuntu

Sim City 4 Deluxe Edition Install Wine Linux. Trouble installing from CD/Disk 2

Posted: 19th of May 2019

Views: 1427