1. Ensure systemd-timesyncd
is installed:
Open the terminal and install systemd-timesyncd
if it's not already installed:
sudo apt install systemd-timesyncd
2. Configure NTP servers:
Edit the /etc/systemd/timesyncd.conf
file to specify your preferred NTP servers:
sudo nano /etc/systemd/timesyncd.conf
In the file, locate the [Time]
section and set the NTP
and FallbackNTP
values as desired:
[Time]
NTP=a.st1.ntp.br
FallbackNTP=b.sti.ntp.br c.sti.ntp.br
Replace a.st1.ntp.br
, b.sti.ntp.br
, and c.sti.ntp.br
with the NTP servers you wish to use. Using regional NTP servers can improve synchronization accuracy.
3. Restart systemd-timesyncd
:
Apply the new configuration by restarting the service:
sudo systemctl restart systemd-timesyncd
4. Verify synchronization status:
Check the synchronization status to ensure it's active:
timedatectl status
Ensure that "System clock synchronized" is marked as "yes".