ubuntu设置时间
ubuntu使用timedatectl管理时间和时区
设置时区
timedatectl list-timezones
timedatectl set-timezone "Asia/Shanghai"
设置时间同步服务器
启用NTP同步
timedatectl set-ntp true
设置同步服务器
vi /etc/systemd/timesyncd.conf
[Time]
NTP=0.cn.pool.ntp.org 1.cn.pool.ntp.org 2.cn.pool.ntp.org 3.cn.pool.ntp.org
查看是否生效
timedatectl timesync-status
timedatectl