Ubuntu 时间不准,怎么设置NTP时间同步?
设置时区、ntp服务器
sudo timedatectl set-timezone Asia/Shanghai
sudo sed -i 's/#RootDistanceMaxSec=5/RootDistanceMaxSec=999999999/' /etc/systemd/timesyncd.conf
sudo sed -i 's/#NTP=/NTP=ntp.aliyun.com/' /etc/systemd/timesyncd.conf
systemctl restart systemd-timesyncd