You are not logged in.
Hi all,
What's the difference between executing timedatectl set-ntp true and enabling systemd-timesyncd?
Also, on a fresh Arch install timedatectl status shows NTP service: active, so why in the General recommendations page there is a section about Clock synchronization?
Last edited by EgidioCaprino (2021-05-07 18:56:50)
Offline
set-ntp [BOOL]
Takes a boolean argument. Controls whether network time synchronization is active and enabled (if available). If
the argument is true, this enables and starts the first existing network synchronization service. If the
argument is false, then this disables and stops the known network synchronization services. The way that the
list of services is built is described below.
In other words, it will enable AND start systemd-timesyncd.service. According to the man page it might also start and enable another ntp service instead, but from a quick glance I could not see how it will determine which service to use if multiple are available. However, on a clean Arch install, you will only have systemd-timesynd.service available, as it is a part of systemd. Other ntp services must be installed manually.
Enabling systemd-timesyncd.service will not take effect until next boot, unless you also start the service.
As for this being active after a fresh Arch install is something I am not familiar with, and from what I know it will not be so unless you specifically enable it at some point.
Offline
It's all clear now, thank you so much!
Offline
Please remember to mark your thread as [SOLVED] by editing your first post and appending it to the title.
Offline
I tried but the title is too long. Should I trim it?
Offline
That might be a good idea, you might try to trim it down to:
"timedatectl set-ntp true" vs systemd-timesyncd
It is shorter, but still clearly states what your question was about.
Offline
Done, thank you!
Offline
For completeness, regarding the second part of your question:
[...] why in the General recommendations page there is a section about Clock synchronization?
I don't know the exact technical reasons, but there are other NTP/time sync options beside systemd-timesyncd, some of which are more accurate (usually only a concern for distributed systems as far as I understand).
Offline
That makes sense. Thank you adigitoleo!
Offline