Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • Best 6 Nintendo Switch Apps of 2022 Gaming
  • How to Protect Your Computer from Hackers, Spyware and Viruses Computer Tips
  • How to Setup Free Dynamic DNS for Remote Access to Your PC Computer Tips
  • How to Change Language on Amazon Computer Tips
  • 11 Fixes for When Your AirPods Don’t Show Up in the Find My App Fixes
  • 5 Free Online OCR Services Tested and Reviewed Cool Websites
  • Disable Keyboard Keys in Windows with AutoHotKey How-To
  • baby monitor app android How-To

Terminal Tricks: Use the Terminal as an alarm clock

Posted on October 9, 2020 By blog_786 No Comments on Terminal Tricks: Use the Terminal as an alarm clock

If you keep your computer on all the time and are looking for a good way to wake up in the morning, this is easy. All you need is your regular music player and a sleep command. The sleep command is a built-in tool (at least in Ubuntu) that allows you to set a timer for any time (seconds, minutes, hours and days). If we combine the “sleep” command with our favorite music player and song, then we can set an alarm that will wake us up at a given time. This is how it works.

Set a Sleep Timer in Terminal

First open your terminal.

Once the Terminal is open, let’s take a look at how the “sleep” command works. Everything is very simple. To fall asleep for 10 seconds, use this command:

To sleep for 10 minutes, use this command:

– /

To sleep 10 hours, use this command:

Finally, to fall asleep for 10 days, use this command:

You can even combine commands, so if you want to sleep 5 hours and 30 minutes, you must use one “sleep” command with both times:

It’s simple! Of course, when your time is up, nothing else will happen, because all the “sleep” command is doing is counting down the amount of your sleep. To turn this alarm into a real alarm, we need to add to the command. For our music player, we will be using mplayer, but you can also easily use Totem, VLC, Banshee, or any other favorite music player.

For example, to invoke mplayer, we have to use this command:

By entering this into Terminal (replacing the actual path and name of the music file of course), we can listen to any song we want. Of course, the downside (when trying to create our alarm clock) is that the song plays right away.

Decision? Use the sleep command and our music player together. We will combine the two commands with “&&”, which will run the first command and then, only after it completes, will run the second. Our last team? Let’s say we want to sleep 8 hours:

It’s simple! The “sleep” command will wait 8 hours and then when the time is up, it will stop, allowing the second command – where the music is actually playing – to start. Instant alarm clock.

Of course, this has a couple of disadvantages. First, for many people, computers either go to sleep or go to sleep after a certain amount of time. This clearly would not suit our alarm clock. For this reason, you may need to disable power savers. Also, remember to double check your volume settings before bed. It would be bad if the sound was completely removed; the next morning you may not wake up! However, being able to set an alarm with just one command is a great way to take advantage of the Terminal; it really offers great speed, power and performance.

–

Share this:

  • Twitter
  • Facebook
Linux Tips

Post navigation

Previous Post: Show the Classic Navigation Tree in Windows 7 Explorer
Next Post: How to Add a Program to Startup in Windows XP

Related Posts

  • HDG Explains : What Is UNIX? Linux Tips
  • 7 Linux Commands Every Beginner Should Know Linux Tips
  • How To Quit Frozen Programs In Linux Linux Tips
  • 10 Ubuntu Keyboard Shortcuts To Speed Up Your Workflow Linux Tips
  • How To Install a Linux OS On Your Android Phone Linux Tips
  • Easily View Hardware Information in Ubuntu 10.04 Linux Tips

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • March 2021
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Categories

  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Featured Posts
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • Help Desk
  • How-To
  • iOS
  • iPad
  • iPhone
  • islamic Books
  • Linux
  • Linux Tips
  • Mac OS X
  • macOS
  • MS Office Tips
  • Networking
  • Office Tips
  • OS X
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tools Review
  • Troubleshooting
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • Flixable Helps You Find the Best Movies and TV shows on Netflix
  • How to Watch Winter Olympics 2018 from Anywhere
  • Why does Instagram say this story is unavailable?
  • How to turn off Do Not Disturb mode on Android
  • 3 Sites like YouTube to Earn Money With Your Videos
DMCA.com Protection Status

Recent Posts

  • Flixable Helps You Find the Best Movies and TV shows on Netflix
  • How to Watch Winter Olympics 2018 from Anywhere
  • 5 Sites That Are Like Audible, But Free
  • How to Reduce PNG File Size of a Photo
  • Why does Instagram say this story is unavailable?

Recent Comments

  1. 5 Sites That Are Like Audible, But Free on 14 Best Free Audiobooks on Audible – 2022
  2. How to Reduce PNG File Size of a Photo on How to Convert a Screenshot to a Jpeg on a Mac
  3. 3 Sites like YouTube to Earn Money With Your Videos on Here are the Top 10 highest paid YouTubers of 2013
  4. Buying Bitcoin in India? Top 4 Indian Bitcoin Exchange Compared on How to Buy Bitcoin in India – Step by Step Guide
  5. TemplateMonster WordPress Theme Review Build a Site With Ease on How to make a secure website with WordPress 2023
  • The 3 Best HomeKit Compatible Smart Thermostats Hardware
  • Where are Windows taskbar shortcuts? Computer Tips
  • How to Reset Network Settings in Windows 10 Windows 10
  • How to Tell if a Folder is Shared in Windows 10 Windows 10
  • 20 Tips To Get The Most Out Of The Finder On Mac OS X
  • How to Upgrade Microsoft SQL Server the Right Way How-To
  • How To Move Columns In Excel Office Tips
  • vat calculator israel

    Top hits of vat calculator israel. In the event you were previously collecting VAT in South Korea, you don't need to achieve that. Furthermore, VAT is

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version