NTP Installation and Configuration

Install

Install the ntp package sudo apt install ntp

Check if the service is running sudo systemctl status ntp.service or service ntp status

● ntp.service - LSB: Start NTP daemon
   Loaded: loaded (/etc/init.d/ntp; bad; vendor preset: enabled)
   Active: active (running) since Thu 2019-10-10 12:42:13 WEST; 11s ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/ntp.service
           └─4100 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 115:120

Configure

Open the configuration file sudo vi /etc/ntp.conf. Comment any default pool and add the following

server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
server 3.pool.ntp.org

restart the service sudo systemctl restart ntp.service or service ntp restart

Test

Run ntpq -p

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 time.videxio.ne 131.188.3.223    2 u    1   64    1    0.328    0.507   0.000
 ntp1.vmar.se    .INIT.          16 u    -   64    0    0.000    0.000   0.000
 ntp1.ds.network 85.199.214.99    2 u    1   64    1    1.666    0.663   0.000
 time.shf.uk.as4 .INIT.          16 u    -   64    0    0.000    0.000   0.000

Found errors? Think you can improve this documentation? Simply click the Edit link at the top of the page, and then the icon on Github to make your changes.