linux同步网络时间

xiaoxiao2021-02-28  14

1、安装ntpdate(sudo apt-get install ntpdate) 2、同步时间:ntpdate 1.cn.pool.ntp.org 3、设置时区:cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 4、写进硬件时钟:hwclock -w 5、添加定时任务: vi /etc/crontab 10 5 * * * root ntpdate 1.cn.pool.ntp.org;hwclock -w

转载请注明原文地址: https://www.6miu.com/read-2150164.html

最新回复(0)