It is a good practice to keep your clock synchronized with the Internet according to your specified time zone unless there is a need to alter system time manually. This article describes ways through the command line and the graphical user interface of Debian 10 to keep your clock sync with the internet time servers. This facility was originally developed for older computers that had trouble keeping up with the current time.
We have run the commands and procedures mentioned in this article on a Debian 10 Buster system.
The timedatectl command lets you check the current time status of your system clock. Open your Debian terminal through the Application Launcher Search as follows:
Then, run the following command:
$ timedatectl status
Among other details, you can see the Local time, the Universal time and also if your system clock is synchronized with the internet time servers or not.
The chronyd command lets you check the time by which your system clock is off. If you run a chronyd command without installing the utility first, you will get the following message:
First, let us install it as follows:
$ sudo apt-get install chrony
If your time was already not synced, like mine, you would notice that the utility immediately syncs the time right after installation.
This is how Chrony will help you:
$ sudo chronyd -Q
$ sudo chronyd -q
In the following example, you can see that when I first ran the chronyd -q command, my system was off by 103.43 seconds. After running the command, my internet time was reset and that can be observed when I re-ran the command. This time my system clock is only off by 0.001331 seconds which is an ignorable difference.
Operating Systems these days are set to fetch Date & Time and Time zones automatically through the internet. You can set your system to fetch date and time according to the selected time zone as follows:
Click the downward arrow located at the top right corner of your Debian desktop and then click the settings icon located at the bottom left corner:
OR
Type Settings in the Application Launcher search as follows:
Click the Details tab and then select the Date & Time option. Click on the Unlock button on the Date & Time view and provide the password for sudo/authorized user in the Authentication dialog.
Then, make sure your Automatic Date & Time button is turned on. This will enable you to automatically fetch the current date and time from the internet server.
Important: On Debian, you will be able to turn the Automatic Date & Time On /Off only when the Chrony utility is uninstalled first. You can do so by running the following command in the Terminal:
$ sudo apt-get remove chrony
By following the steps described in this tutorial, you can be 100 percent sure that the current time of your system is in sync with that of your internet time server.
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…