5

I am on Ubuntu 12.04 LTS, in the dialog "Time and Date settings" there is a set of radio buttons labeled as "Set the time", the two options are "Manually" and "Automatically from the Internet":

enter image description here

My current selection is "Automatically from the Internet" and I am fine with that apart from the fact that I would like to change the synchronization server (I would like to set it to ntp1.inrim.it). Is it possible without installing the ntp package? I did not find any way to change the server from the dialog.

3
  • @con-f-use So I need to install ntp? Dec 15, 2013 at 12:22
  • Note that the answers in that other thread do not address how to configure NTP using simply the pre-installed ntpdate, but only how to configure the NTP daemon that you have to install first. I would argue the two questions differ ever so slightly. Anyways... :) Dec 16, 2013 at 17:52
  • @MalteSkoruppa Thank you, I edited my question as suggested in the "marked as duplicate..." box. Dec 16, 2013 at 18:30

2 Answers 2

9

There are two main ways to set the current time via NTP: ntpdate is a command-line tool that, when run, fetches the current time from an NTP server and sets the system time accordingly. ntpd is the NTP daemon which runs in the background and continuously adjusts the time slightly.

For servers, production environments and such, ntpd is better. However, for normal desktop PCs and end users, ntpdate is perfectly fine. In fact, when you install Ubuntu Desktop, it comes with ntpdate preinstalled, but not ntpd.

When you select "Automatically from the Internet" in your Ubuntu system settings as shown in your screenshot above, what happens is that at each boot Ubuntu will fetch the current time using ntpdate from ntp.ubuntu.com. If you want to change that server, you can edit the value of NTPSERVERS in /etc/default/ntpdate.

The alternative is to install ntpd (in package ntp), and configure that via /etc/ntp.conf. This is explained here in more detail:

https://help.ubuntu.com/lts/serverguide/NTP.html

However, if you do not want to install any additional packages and simply change the default server for ntpdate which comes pre-installed with Ubuntu, simply edit /etc/default/ntpdate.

1
  • 3
    Thank you. My question was marked as duplicate but the other answers just tell me to install ntp while your answer about /etc/default/ntpdate is what I was looking for. Dec 16, 2013 at 18:12
3

For Ubuntu 16.10 Desktop the config file (without installing ntp packages) is

/etc/systemd/timesyncd.conf

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .