上一篇 下一篇 分享链接 返回 返回顶部

Centos同步时间

发布人:娄工 发布时间:2023-06-11 21:32 阅读量:969

linux系统的时间同步主要分两种:

下面主要针对centos系统进行说明,其他系统都类似

 

一、同步时区

date -R #查看时区

timedatectl list-timezones #列出所有时区

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

二、同步时间

安装ntpdate工具

yum -y install ntp ntpdate

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

ntpdate http://cn.pool.ntp.org

3、再重新检查当前时间:

date

目录结构
全文
微信群 微信群
公众号 公众号
服务热线: 400-026-2810
电子邮箱: lougao@setonink.com