基于【 centos7】二 || 系统时间与网络时间同步


# date // 查看系统时间
#hwclock // 查看硬件时间

# yum -y install ntp ntpdate 安装ntpdate工具

# ntpdate cn.pool.ntp.org  设置系统时间与网络时间同步

# hwclock --systohc  将系统时间写入硬件时间


timedatectl # 查看系统时间方面的各种状态
timedatectl list-timezones # 列出所有时区

timedatectl set-local-rtc 1 # 将硬件时钟调整为与本地时钟一致, 0 为设置为 UTC 时间

timedatectl set-timezone Asia/Shanghai # 设置系统时区为上海

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM