时间校准
查看当前系统时间
[root@centos64 ~]# date
查看硬件时间
[root@centos64 ~]# hwclock --show
同步时间可以用:ntpdate us.pool.ntp.org,需要联网。如果没有安装ntpdate的可以yum一下:yum install -y ntpdate。
将系统时间写入到系统硬件当中
[root@centos64 ~]# hwclock -w
设置时区
linux获取的时间比实际时间差八个小时,这个一般是因为时区设置导致的,我们可以在 /etc/profile 中设置时区设置为CST时区,然后source /etc/profile。
export TZ='CST-8'
本文指导如何在CentOS系统中进行时间校准,包括查看系统时间和硬件时间、使用ntpdate同步时间、写入硬件时钟,并解决时区问题,确保时间准确无误。
1509

被折叠的 条评论
为什么被折叠?



