How to schedule an automatic power on and off in Ubuntu Linux

The Ubuntu operating system is one of the most popular open source systems out there today. This system comes from the hand of Linux and is thought to be one of the best alternatives to the Microsoft system. It even allows you to install packages and programs from the terminal .

The tools that Ubuntu offers you are many and the level of customization that it has cannot be equaled and in this article we are going to talk to you precisely about that. We will show you how to program a very useful function which is to be able to set the on and off of your PC in Windows 10 . So please read this article very carefully to make it easy.

How to schedule an automatic shutdown from Ubuntu Linux?

Doing this type of procedure is quite simple. You can program your PC to shut down or restart according to how you want to program it, and the steps to follow are as follows:

If you want it to turn off immediately without waiting time , then this is the procedure you should do:

  • You must write the following command: sudo shutdown -h now and with that your computer will shut down immediately. If you want it to turn off within a certain time then the step to follow is the following:
  • You must type the following command sudo shutdown -h 30 in this case, the shutdown time will be 30 minutes

Now, if what you want is to program it to turn off at a specific time, then this is the procedure you should do:

  • For example, if you are going to program your computer to shut down at 9:30 p.m. then you must write the following command: sudo shutdown -h 21:30

If what you want is to restart your pc immediately without having to wait for any time interval, then this is what you should do:

  • You must type the following command on your computer: sudo shutdown -r now

In the event that you want to restart your pc within certain minutes , then follow this step, this time we will show you how to do it in 30 minutes: You must write the following command that we will give you below:

  • sudo shutdown -r 30. If you are going to restart your computer at an exact time , then you should do the following:

You simply have to set the restart at the time you want, for example at 21:30 pm. So to do it you must write the following command: sudo shutdown -r 21:30

If now what you need is to cancel any of these tasks that you have already predetermined, such as the ones we have seen about restarting and shutting down, what you should do is very simple:

  • You just have to type the following command: sudo shutdown -c

How to schedule the shutdown of the Ubuntu operating system from its interface?

Thanks to this program you will be able to configure the tasks graphically, a great advantage thanks to the fact that it is quite easy to use it. This time we will show you what it works for. To install qshutdown you can do it through the software center looking for the name of the App, in this case qshutdown

Or if you like, you can also install qshutdown from the terminal, you just have to type some commands that we will give you below:

  • If you are going to add PPA to the program, you must type the following command: sudo add-apt-repository ppa: hakaishi / qshutdown
  • If you need to update your list of installed packages, you must type the following command: sudo apt-get update
  • And in case what you need is to install the program, then the command you should use to do it is the following: sudo apt-get install qshutdown

Once you have installed it, you must go to Applications and then Accessories and when you have located the program, you must open it. Then a window will appear and in the first drop-down menu is where you can make the settings you want, such as Shut Down, Restart, Suspend, and Hibernate.

You can also adjust the time and date of the scheduled task on your calendar, this option is just to the right. At the bottom you can set the hour and minute that your computer will shut down. Something interesting is that you can see the creation date of a file .

Another thing you can do is select the remaining minutes until it turns off, and for the countdown to be activated, you just have to click on accept for the task to start automatically.

 

Leave a Comment