In this article, I will show you how to set timers, alarms, and stopwatches on your CentOS 8 system. We will perform these actions using two different ways. Using:
On the GUI, we will use the GNOME Clocks Utility, on the command line, we will use the timer and sleep command.
Gnome Clocks is a utility that facilitates the user to show the date and time of various locations. Using this utility, users can set alarms and use stopwatch in a single application.
Here, we will demonstrate that if this utility is not already installed on your system then how you can install and use it on your system CentOS 8.
Gnome Clocks application is present in the CentOS 8 repository. You can directly install it using GUI. Click on Activities and type ‘Gnome Clocks’ in the application search bar or you can also find this utility directly to go into the Software’s. From the search results list, you will select Gnome Clocks and click on it. The following screen will appear:
Here, you will click on the ‘install’ button to start the installation process. As you will see that the installation progress bar is displayed as follows:
Using the above dialog options, you can directly launch the Gnome Clocks or if you want to uninstall it for any reason then you can remove it as follows:
You can also launch this tool using the command line by executing the following command:
$ gnome-clocks
When Gnome Clocks will open on your CentOS 8 system the following window will be displayed. You can add the world clock according to your location and time zone as follows:
In the next tab of the Gnome Clocks window, click on the ‘Alarm’ tab. Here, you can add a new alarm by clicking on the ‘Add Alarm’ button as follows:
Now, you need to adjust the following option in the dialog box:
Once you have completed all the alarm information, click on the ‘Add’ button to set this alarm as follows:
Once you saved the alarm, you can also edit from the alarm list of the edit option.
Similarly, you can also delete an alarm from the remove alarm or delete option as follows:
Click on the stopwatch tab. You will see the following view:
Here, you can perform the following actions:
Click on the start button to run a stopwatch. Using the lap button, count laps on a running stopwatch as follows:
Continue a stopped stopwatch, use the Resume button and if you want to reset the stopwatch then you will use the ‘Clear’ button as follows:
Click on the ‘Timer’ tab to open timer view as follows:
Here, you can select the duration of the timer. Click on the start button to start the timer and pause button to stop the running timer.
You can set alarms, timers, and stopwatch executing the below-mentioned commands on the terminal. These commands are almost similar to all Linux distributions. Here, we are implementing on CentOS 8.
Open the terminal using Ctrl + Alt + t shortcut method.
To install timer utility type the following command:
$ curl -o ~/timer https://raw.githubusercontent.com/rlue/timer/master/bin/timer
$ sudo chmod +x ~/timer
To get the help related to the timer run the below-given command:
$ ./timer –h
For example, you will use the following command to set the timer for 10 seconds:
$ ./timer -d 10
To set time for 1 minute using the following command:
$ ./timer 1
To run stopwatch using the terminal execute the following command on the terminal:
$ time cat
After executing the above command, nothing will print on the terminal. When you will terminate the terminal using Ctrl +C shortcut keys. After that, you will see that duration of time between the running and termination has been displayed as follows:
To set the alarm using the terminal you will perform the following steps:
$ sleep [x]h [x]m && mplayer /path/to/file.mp3
For example, you want to play an alarm after 4 hours.
$ sleep 4h && mplayer /Music/alarmtone.mp3
$ sleep 10m –use this terminal command wait for 10 minutes
$ sleep 10s –wait terminal for 10 seconds
$ sleep 10h –wait terminal for 10 hours
$ sleep 10d – wait terminal for 10 days
In this article, you have learned how to set alarms, timers, and stopwatch using GUI as well as the Command line. I hope this article would be useful for you. Furthermore, you can explore more terminal commands. Please give us your feedback in case of any problem via comments in the comment box.
Magento is a free and open-source e-commerce platform written in PHP. It is simple, easy…
ISPConfig is an open-source control panel that allows users to manage multiple servers from a…
As a Linux administrator, you may find it necessary to troubleshoot or test your Simple…
Ubuntu 24.04, like many modern Linux distributions, relies on the NetworkManager for managing network connections.…
Restic is a modern, open-source backup program designed for efficiency, security, and simplicity. It enables…
phpMyAdmin is a popular free tool written in PHP intended to administer MySQL and MariaDB…