Skip to content

5000+ Great Articles

Best Articles & Essays: Interesting Articles to Read Online

  • Apple’s Self-Screening Tool for Corona Virus How-To
  • Best Cleaning App for MacOS 2020 OS X
  • The 5 Best Free Online Browser Games To Kill Hours Of Time Gaming
  • How To Use ADB Wirelessly On Your Android Smartphones
  • How to Delete Picsart Video Files on Android Devices Smartphones
  • How To Rotate Your Macbook Screen to 90 Degrees How-To
  • How To Fix iMessage Waiting for Activation Error on iPhone iPhone
  • How to Set Up a Daily Routine on Amazon Echo Dot with Alexa App How-To

Terminal Tricks: Use the Terminal as an alarm clock

Posted on October 9, 2020 By bilal 1983 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:

  • Facebook
  • X
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

  • The Easiest Way to Remotely Connect to Linux Mint from Any OS Linux Tips
  • Forcefully Close a Program in Ubuntu Linux Tips
  • Top 10 Best Linux Apps For Ubuntu Users Linux Tips
  • What Are Inodes in Linux and How Are They Used? Linux Tips
  • Fedora vs Ubuntu 2021 Linux Tips
  • 9 Useful Things Linux Can Do that Windows Can’t Linux Tips

Leave a Reply Cancel reply

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

Archives

  • November 2023
  • 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

  • – 436
  • – 939
  • 1Win AZ Bonuslar, Mobil Tətbiq və Mərc Marketləri – 376
  • 1xbet Azerbaycan,1xbet az merc saytı, en yaxsi bukmeker 1xbet Azerbaycan merc oyunlari, 1xbet az, Azerbaycan merc saytlari – 280
  • AI Tools & Guides
  • Amazon Web Services
  • Apple Watch
  • B1 Bet Aviator: Jogo de Cassino Online Tutorial Passo a Passo 202 – 14
  • blog
  • Calculator
  • Computer Tips
  • Cool Websites
  • Dasinmaz emlak elanlari, ev elanlari, ev alqi satqisi, kiraye evler, torpaq, obyekt, bina, bina ev, mənzil, villa, kreditle satilan evler – 814
  • 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
  • Tutorial
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • Windows 7
  • Windows XP Tips
  • Wordpress
  • бонусы до 250%, официальный сайт в Узбекистане – 69
  • Мостбет Уз Ставки на спорт и казино в букмекерской конторе Mostbet Uz – 527
  • ベラジョンカジノの出金方法一覧【2023年 最新】出金限度額・出金の流れ・出金手数料・出金条件 – 466
  • 1Win Güncel Giriş Adresi 1Win Engelsiz Yeni Giriş
  • 4 Things You Can Do If You Forget Your Wi-Fi Password
  • How To Use DriveDroid to Boot Linux On PC Using Android
  • How do I Find Release Date of Any Google Play App
  • How To Change IP Address in Windows
DMCA.com Protection Status

Recent Posts

  • 12 Most Common Android Problems and Their solutions
  • Male Models With Onlyfans – OnlyFans Sites Online!
  • Access Windows Shared Folder From Android Over Wi-Fi
  • 21SEIKI石巻中里【石巻市】 ベラジョンカジノの入金方法を徹底解説【2023年最新版】
  • ベラジョンカジノで大勝ちを狙えるゲーム10選 4,000万円以上稼いだ強者も!? CASINO JUICE カジノジュース

Recent Comments

  1. Instagram stories not working/loading? Try These 9 Fixes on Can’t update PS5 system software? Try These 10 Fixes
  2. How to Link to a Specific Part Of A Webpage & Share it on Best PDF to Word Converter Online (Free Without Email)
  3. See What’s Taking up Space on Your Hard Drive on 7 best 3D scanning apps for Android and iOS
  4. Make your Devices Read Out Text, With Text to Speech on 9 Best 10K Running Apps for 2023
  5. How to Find your Router’s IP Address on How to Fix Apple CarPlay Not Working? 7 Possible ways
  • How To Move Your Dropbox Folder Computer Tips
  • How to Respond to Messages on Instagram (Mobile and PC) technology
  • Software Apps To Effortlessly Convert Music Files To Different Formats

    You've probably come across a situation where you have a music file in one format like MP3, but you need it to be M4R or some other type of audio. I

  • Change Measurement Units in Microsoft Word Office Tips
  • How to animate on procreate 2022 technology
  • Encrypted Chat Applications You Can Use to Chat Privately Software Reviews
  • How To Fix Windows Keyboard Keys Which Stop Working Help Desk
  • How to Setup Amazon SNS 2021 Amazon Web Services

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Go to mobile version