安裝NTP套件
$ sudo apt-get install ntp

更新日期時間指令
$ sudo ntpdate time.stdtime.gov.tw
如果出現以下訊息:請先停止ntp服務
27 May 15:37:14 ntpdate[2466]: the NTP socket is in use, exiting

$ sudo /etc/init.d/ntp stop
$ sudo ntpdate time.stdtime.gov.tw

查看BIOS時間
$ sudo hwclock -r
更新BIOS時間
$ sudo hwclock -w

將每天更新時間
$ sudo crontab -e
0 0 * * *     /usr/sbin/ntpdate time.stdtime.gov.tw > /dev/null 2 > &1

完成

arrow
arrow
    全站熱搜

    蒼穹 發表在 痞客邦 留言(0) 人氣()