当我查看https://help.ubuntu.com/lts/serverguide/NTP.html 时,我可以看到timedatectl的当前时间配置,但我总是收到错误消息。
$ timedatectl status
Failed to create bus connection: No such file or directory
$ sudo timedatectl status
Failed to create bus connection: No such file or directory
# timedatectl status
Failed to create bus connection: No such file or directory
Run Code Online (Sandbox Code Playgroud)
没有安装ntp包,服务运行正常。
# systemctl status systemd-timesyncd
* systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
`-disable-with-time-daemon.conf
Active: active (running) since Thu 2018-03-15 15:37:16 CET; 17h ago
Docs: man:systemd-timesyncd.service(8)
Main …Run Code Online (Sandbox Code Playgroud)