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.

Learn how to schedule an automatic power on and off in Ubuntu Linux using the command line interface. Streamline your system’s power management and save time effortlessly

Scheduling an automatic power on and off in Ubuntu Linux can be done using various tools and commands. Here’s a concise guide in tabular format:

Task Tool/Command Steps
Automatic Power Off cron job with shutdown 1. Open terminal. <br> 2. Type crontab -e to edit the cron jobs. <br> 3. Add a new line in the format: MIN HOUR * * * /sbin/shutdown -h now (replace MIN and HOUR with your desired time).
Automatic Power On BIOS/UEFI settings 1. Reboot your system and enter the BIOS/UEFI settings (usually by pressing F2, F10, DEL, or ESC during boot). <br> 2. Look for a power management section. <br> 3. Set the automatic power on time if available. <br> Note: Not all systems support this feature.

Additional Notes:

  • Automatic Power Off: The cron job runs the shutdown command at a specified time. You can set this for daily, weekly, or monthly power-offs.
  • Automatic Power On: This is dependent on your computer’s hardware and might not be available on all systems. Check your system’s manual for more details.
  • Time Format in Cron: The time format in a cron job is in 24-hour format. For example, to shut down the computer at 10 PM every day, you would write 0 22 * * * /sbin/shutdown -h now.
  • Editing Cron Jobs: Ensure you’re careful while editing cron jobs. Incorrect entries can affect system behavior.
  • Saving Cron Jobs: After adding the cron job, save and exit the editor. The cron daemon will automatically pick up the new job.
  • System Compatibility: Check if your system’s BIOS/UEFI supports scheduled power ons, as this feature is not universally available.

Remember that scheduling a power on requires BIOS/UEFI support and may not work on all machines. The scheduled power off, however, will work on any system running Ubuntu Linux.

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.

 

by Abdullah Sam
I’m a teacher, researcher and writer. I write about study subjects to improve the learning of college and university students. I write top Quality study notes Mostly, Tech, Games, Education, And Solutions/Tips and Tricks. I am a person who helps students to acquire knowledge, competence or virtue.

Leave a Comment