因为Linux系统在安装的时候需要选择系统时区,很多人在安装的时候没有注意,从而导致系统时间出错,出现这样的问题该如何解决呢?下面小编给大家介绍Linux系统修改时区的方法。
因为Linux系统在安装的时候需要选择系统时区,很多人在安装的时候没有注意,从而导致系统时间出错,出现这样的问题该如何解决呢?下面小编给大家介绍Linux系统修改时区的方法。
1、查看系统时间
#date
可以看到时区为EST(美国东部标准时间),正常显示应该是CST(中国标准时间)。

2、查看系统时区
#date -R
可以看到输出为
Fri, 21 Nov 2014 00:54:08 -0500
时区为-5
正常时区应该显示为+8(东八区)

3、确保网络通畅,DNS正常解析,尝试同步互联网时间
#ntpdate cn.pool.ntp.org

4、查看系统时区配置文件
#cat /etc/sysconfig/clock

5、查看本地系统时区配置文件
#strings /etc/localtime

6、尝试修改系统时区
#tzselect
根据系统提示选择正确的时区

7、如果不能正常解决
#cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

8、再次查看系统时区和系统时间,已经正常显示了
#date
#date -R

上面就是Linux系统时区修改方法的介绍了,时间不对可能会导致一些系统错误,应及时改正过来,希望这些方法能帮助到你,想了解更多内容可以对自由互联进行关注!