1 #安装NTP
2 sudo apt-get install ntpdate
3 #选择 上海时区
4 sudo dpkg-reconfigure tzdata
Here screen will appear, first select Asia, and then select Shanghai.
#同步时间
#添加到/etc/rc.local里面实现开机自启动
sudo ntpdate cn.pool.ntp.org
#查看当前时间
date
1 #安装NTP
2 sudo apt-get install ntpdate
3 #选择 上海时区
4 sudo dpkg-reconfigure tzdata
Here screen will appear, first select Asia, and then select Shanghai.
#同步时间
#添加到/etc/rc.local里面实现开机自启动
sudo ntpdate cn.pool.ntp.org
#查看当前时间
date