同步网络时间
sudo apt-get install ntpdate/ centos用 yum install ntpdate
1. 安装ntpdate工具
# sudo apt-get install ntpdate
2. 设置系统时间与网络时间同步
# ntpdate cn.pool.ntp.org
3. 将系统时间写入硬件时间
# hwclock –systohc
执行到第三步的时候出现一系列的帮助信息,并且提示:
hwclock takes no non-option arguments. You supplied 1.
于是:
# sudo hwclock -w
成功!