1??查看当前CentOS系统版本:
[[email protected] ~]$ cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
2??查看时区:
[[email protected] parallels]# ll /etc/localtime
lrwxrwxrwx. 1 root root 41 Aug 10 2017 /etc/localtime -> ../usr/share/zoneinfo/America/Los_Angeles
3??修改时区:
[[email protected] parallels]# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
[[email protected] parallels]# ll /etc/localtime
lrwxrwxrwx 1 root root 33 Dec 12 22:00 /etc/localtime -> /usr/share/zoneinfo/Asia/Shanghai
[[email protected] parallels]# date
Thu Dec 12 22:00:24 CST 2019
#查看时间还是不正确,重启
[[email protected] parallels]# reboot
4??查看当前时间:
[[email protected] ~]$ date
Fri Dec 13 11:35:36 CST 2019
原文地址:https://www.cnblogs.com/wucaiyun1/p/12034261.html
时间: 2024-11-01 16:17:20