Home > Operation and Maintenance > Linux Operation and Maintenance > How to correct the wrong time in Linux?

How to correct the wrong time in Linux?

angryTom
Release: 2019-11-06 14:38:49
Original
5668 people have browsed it

How to correct the wrong time in Linux?

linux时间不对怎么修改?

1、使用cp命令将/etc/localtime覆盖掉。

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 
cp: overwrite ‘/etc/localtime’? y
Copy after login

查看:date

Fri May 10 15:06:17 CST 2019
Copy after login

2、使用软件进行时间同步

yum install ntpdate -y 
ntpdate -u 210.72.145.44 # 网络时间同步命令
Copy after login

210.72.145.44:中国国家授时中心的官方服务器。

推荐:linux教程

The above is the detailed content of How to correct the wrong time in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template