linux同步系统时间

1.安装 ntpdate工具

yum -y install ntp ntpdate

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

ntpdate time.windows.com  
ntpdate cn.pool.ntp.org

3.查看当前时间

[root@twh ~]# date
Tue Dec  8 15:44:16 CST 2020

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

hwclock --systohc

5.查看硬件时间

hwclock

6.设置硬件时间

 hwclock –set –date = (月/日/年 时:分:秒)

7.设置系统时间

date -s "20201207 01:00:00"
原文地址:https://www.cnblogs.com/setout/p/14103099.html