linux 下开机同步时间

linux下开机同步时间
需要开启ntpdate服务
vi/etc/rc.local
ntpdate 204.46.232.182
这样开机之后就同步时间了
也可以在crontab里面设置定时创建时间
10 5 * * * root ntpdate us.pool.ntp.org;hwclock -w
这样每天5:10自动进行网络校时,并同时更新BIOS的时间
使用date -s 修改时间
在更改完时间之后,使用clock -w把当前的时间同步到BIOS里面

posted @ 2013-06-09 15:25  破军  阅读(285)  评论(0编辑  收藏  举报