Can I set the ntp server from Gnome settings?

I would like to know where I can find in GNOME settings (or elsewhere) my current NTP server and how I can change it to something that is local to me. From command line the timedatectl command tells me that NTP is active but I cannot find the server. I also searched in systemd-analyze cat-config systemd/timesyncd.conf but I have found nothing.

I don’t know anything about Gnome.

You can see the current source with timedatectl timesync-status:

$ timedatectl timesync-status
       Server: 192.168.1.1 (192.168.1.1)
Poll interval: 4min 16s (min: 32s; max 34min 8s)
         Leap: normal
      Version: 4
      Stratum: 3
    Reference: 55C3E01C
    Precision: 1us (-21)
Root distance: 5.164ms (max: 5s)
       Offset: -1.081ms
        Delay: 2.527ms
       Jitter: 561.609ms
 Packet count: 27
    Frequency: -52,095ppm

And you can see the log with journalctl -eu systemd-timesyncd

$ journalctl -eu systemd-timesyncd
[...]
Apr 02 16:47:06 mithrial systemd-timesyncd[954]: Contacted time server 192.168.1.1:123 (192.168.1.1).
[...]

To see timesync data:

timedatectl show-timesync

To set a specific server, edit /etc/systemd/timesyncd.conf and search the line ‘NTP=’. Uncomment it (erase the # sign if present) and write your desired server after the equal sign.

If you want to modify, you should create a new file at /etc/systemd/timesyncd.conf.d/override.conf
And add (at least) the following content:

[Time]
NTP=0.de.pool.ntp.org 3.de.pool.ntp.org

(The servers, you can choose whichever source you want, keep them separated by a single space. In the example above, I chose 2 servers from the German pool.)

Then, reload the config: systemctl daemon-reload and systemctl restart systemd-timesyncd

2 Likes

And to be sure NTP is set, type:

timedatectl show

If you see NTP is set to no, execute:

timedatectl set-ntp yes

(You can also set in Gnome activating automatic date and time).