How to change the time server for the _in built_ internet time in ubuntu 16.04 LTS?

I know there are instructions for installing full NTP, but I'd rather change the default server under the default implementation. This question has come up before for 12.04 LTS, however the answer there:

edit the value of NTPSERVERS in /etc/default/ntpdate

appears to be no longer valid.

4

2 Answers

Ubuntu 16.04 uses by default server ntp.ubuntu.com [reference].

To change the default server, edit the config file with an editor:

sudo vi /etc/systemd/timesyncd.conf

Uncomment the NPT= line and define the server you want to be used instead of default:

[Time]
NTP=some.ntp.server.com

To "audit" the time-synchronization events and verify the server that was contacted, use the following command:

cat /var/log/syslog | grep systemd-timesyncd
2

According to the official documentation at:

The nameserver to fetch time for timedatectl and timesyncd from can be specified in /etc/systemd/timesyncd.conf and with flexible additional config files in /etc/systemd/timesyncd.conf.d/.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like