Centos 7系统时间同步

2025-10-27 09:42:49

1、修改时区(可选)

[root@localhost /]# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

Centos 7系统时间同步

2、安装ntpdate(已安装可跳过)

[root@localhost /]# yum -y install ntp

Centos 7系统时间同步

3、网络时间同步

[root@localhost /]# ntpdate -u ntp.api.bz

Centos 7系统时间同步

4、查看系统时间

[root@localhost /]# date -R

Centos 7系统时间同步

5、格式化系统时间

[root@localhost /]# date "+%F %T"

Centos 7系统时间同步

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢