Linux Ubuntu
Configuring time synchronization using the “NTP” protocol in the distribution “Ubuntu” version 22.04

While on the desktop, press CTRL+ALT+T

a terminal will open

install the NTP package, for this we write the command in the terminal: sudo apt install ntp
we agree Y with the installation of additional packages

edit the configuration file with the command: sudo nano /etc/ntp.conf

driftfile /var/lib/ntp/ntp.drift
leapfile /usr/share/zoneinfo/leap-seconds.list
pool pool1.ntp.od.ua
pool pool2.ntp.od.ua
restrict -4 default kod notrap nomodify nopeer noquery limited
restrict -6 default kod notrap nomodify nopeer noquery limited
restrict 127.0.0.1
restrict ::1
restrict source notrap nomodify noquery
restrict pool1.ntp.od.ua
restrict pool2.ntp.od.ua
after editing, press CTRL+X and agree to save

restart the ntp daemon with the command: sudo service ntp restart

periodically check the state of synchronization with the team: ntpq -pn

an * star appeared in front of the server with which synchronization is taking place
setup is complete.

Leave a Reply