CentOS7 更新时间与同步时间

1、查看系统时间

date  

2、查看硬件时间

hwclock  

3、查看系统时间方面的各种状态

timedatectl 

4、列出所有时区

timedatectl list-timezones

5、将硬件时钟调整为与本地时钟一致, 0 为设置为 UTC 时间

timedatectl set-local-rtc 1 

6、安装utpdate工具

yum -y install utp ntpdate

7、设置系统时间与网络时间同步

ntpdate cn.pool.ntp.org

8、将系统时间写入硬件时间

hwclock --systohc

9、设置系统时区为上海

timedatectl set-timezone Asia/Shanghai 

你可能感兴趣的:(CentOS7 更新时间与同步时间)