Linux同步标准时间rdate时间同步

首先安装 rdate和nptdate,然后使用以下命令:

rdate -s time.nist.gov

或:

rdate -s time-b.nist.gov

或:

rdate -s time-a.nist.gov

 或:

ntpdate -u ntp.sjtu.edu.cn

可以加入定时任务,实现自动更新:

vim /etc/crontb  加入以下内容

*/5 * * * * root ntpdate -u ntp.sjtu.edu.cn
*/5 * * * * root rdate -s time-b.nist.gov
*/5 * * * * root rdate -s time-a.nist.gov
*/5 * * * * root rdate -s time.nist.gov

重启定时任务:

sysctmctl restart crond 
致读者:感谢你阅读本文,请随手点击右下角的推荐或分享,谢谢!
原文地址:https://www.cnblogs.com/yzeng/p/15156455.html