Linux修改时间和时区
一、查看时区
1、方式一
timedatectl
- 如下图可见,系统时区为CST
2、方式二
ll /etc/localtime
二、修改时区
1、方法一
1)查看可选时区
timedatectl list-timezones
2)设置时区
timedatectl set-timezone <time_zone>
-
例如:
timedatectl set-timezone America/New_York
2、方法二
mv /etc/localtime /etc/localtime.bak
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
博客内容仅供参考,部分参考他人优秀博文,仅供学习使用