centos7设置系统时间以及时间与网络同步!!!

1.安装ntpdate工具

sudo yum -y install ntp ntpdate
  •  

2.设置系统时间与网络时间同步

sudo ntpdate cn.pool.ntp.org
  •  

3.将系统时间写入硬件时间

 sudo hwclock --systohc

4.手动修改时间

timedatectl set-time 2018-09-18
timedatectl set-time 17:19:00

猜你喜欢

转载自blog.csdn.net/weixin_42207486/article/details/82760813