First, I installed the ntp
package through sudo apt-get install ntp
I accessed /etc/ntp.conf
to change the servers to a few local ones based on country, then I saved and restarted it using sudo systemctl restart ntp
then checked the status with sudo systemctl status ntp
which is shown running.
I also did ntpq -p
which gave the below result, I think this means the client is running:
remote refid st t when poll reach delay offset jitter
==============================================================================
ntp.ubuntu.com .POOL. 16 p - 64 0 0.000 0.000 0.000
*time-a-g.nist.g .NIST. 1 u - 64 77 11.567 -7.287 7.636
-174.138.107.37 46.243.26.34 2 u 63 64 37 84.975 0.159 4.474
-ns3.weiszhostin 128.138.141.172 2 u 1 64 77 69.844 -11.884 6.043
+li290-38.member 128.138.141.172 2 u 65 64 37 43.448 -3.202 6.023
+pugot.canonical 145.238.203.14 2 u 61 64 37 79.540 -5.833 4.040
+alphyn.canonica 132.246.11.231 2 u 4 64 77 11.714 -5.017 7.244
+chilipepper.can 145.238.203.14 2 u 61 64 37 78.136 -4.269 4.769
+golem.canonical 145.238.203.14 2 u 55 64 37 81.139 -3.766 4.748
However, I can't seem to get the daemon to run. I found that out when I did sudo systemctl status ntpd
, then it gave the below result:
ntpd.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
I thought it was not started at first so I did sudo systemctl start ntpd
, but it gave:
Failed to start ntpd.service: Unit ntpd.service not found.
That's when I found out something is seriously wrong, I checked ls -l /etc/init.d
and found only ntp
is in the list, ntpd
can't be found. I also tried to reinstall ntp
but that didn't help.
Any ideas? Thanks a lot!
ntp
but you can tryntpq
instead ofntpd
above.