Understanding systemd-timesyncd
Ubuntu uses systemd-timesyncd
by default. It's a simple, lightweight system that's easy to configure. Before we get to that, let's take a quick look at the systemd-timesyncd.service
file.
The systemd-timesyncd.service file
The [Unit]
section of the /lib/systemd/system/systemd-timesyncd.service
file looks like this:
[Unit] Description=Network Time Synchronization Documentation=man:systemd-timesyncd.service(8) ConditionCapability=CAP_SYS_TIME ConditionVirtualization=!container DefaultDependencies=no After=systemd-sysusers.service Before=time-set.target sysinit.target shutdown.target Conflicts=shutdown.target Wants=time-set.target time-sync.target
Note the ConditionVirtualization=!container
line. The ConditionVirtualization=
part checks to see if the operating system is running in a virtualized environment. In this case, it wants to see whether it's running in a container. The !
in front of container
denotes a negation. In...