sudo apt install ntp
# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board # on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for # more information. #pool 0.ubuntu.pool.ntp.org iburst #pool 1.ubuntu.pool.ntp.org iburst #pool 2.ubuntu.pool.ntp.org iburst #pool 3.ubuntu.pool.ntp.org iburst # Use Ubuntu's ntp server as a fallback. #pool ntp.ubuntu.com pool ntp.nict.jp iburst
# Clients from this (example!) subnet have unlimited access, but only if # cryptographically authenticated. restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
sudo systemctl restart ntp
ntpq -p