1. Ensure systemd-timesyncd is installed:
Open the terminal and install systemd-timesyncd if it's not already installed:
sudo apt install systemd-timesyncd2. Configure NTP servers:
Edit the /etc/systemd/timesyncd.conf file to specify your preferred NTP servers:
sudo nano /etc/systemd/timesyncd.confIn 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-timesyncd4. Verify synchronization status:
Check the synchronization status to ensure it's active:
timedatectl statusEnsure that "System clock synchronized" is marked as "yes".