1 #安装NTP
2 sudo apt-get install ntpdate
3 #选择 上海时区
4 sudo dpkg-reconfigure tzdata
这里会出现界面,先选择亚洲,然后选择上海。
#同步时间
#添加到/etc/rc.local里面实现开机自启动
sudo ntpdate cn.pool.ntp.org
#查看当前时间
date
1 #安装NTP
2 sudo apt-get install ntpdate
3 #选择 上海时区
4 sudo dpkg-reconfigure tzdata
这里会出现界面,先选择亚洲,然后选择上海。
#同步时间
#添加到/etc/rc.local里面实现开机自启动
sudo ntpdate cn.pool.ntp.org
#查看当前时间
date