Centos 7系统时间同步

时间:2026-02-14 05:46:39

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系统时间同步

© 2026 海能知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com