Ubuntu--解决系统时间不正确的问题

原文网址:Ubuntu--解决系统时间不正确的问题_IT利刃出鞘的博客-CSDN博客

简介

说明

本文介绍解决Ubuntu系统时间不正确的方法。

系统时间查看方法

用date命令。

 

场景1:时区不正确

问题描述

可以用此命令查看时区:date -R,如下:

我们是属于东八区,所以最后应该是:+0800。如果不是,就说明我们的时区不对。

解决方法

1.列出所有的时区

timedatectl list-timezones

2. 找到自己的时区

通过Page Up或PageDown或上下按键进行翻页,如下:

3.设置时区

sudo timedatectl set-timezone Asia/Shanghai

场景2:时区正确,系统时间不正确

1.安装ntpdate

sudo apt-get install ntpdate

2.同步时间

sudo ntpdate cn.pool.ntp.org


 

猜你喜欢

转载自blog.csdn.net/feiying0canglang/article/details/128366634