首页 > 系统服务 > 详细

Linux 修改时区

时间:2019-04-21 23:39:29      阅读:152      评论:0      收藏:0      [点我收藏+]
CentOS 7修改方式如下:
# lsb_release -a  --查看系统版本-CentOS Linux release 7.6
# timedatectl     --查看当前系统时区
# ls -l /etc/localtime
# timedatectl list-timezones | grep ‘Dubai‘ 或者grep ‘Shanghai‘查看国内时期。这里我要修改为Dubai时间。
Asia/Dubai
# timedatectl set-timezone Asia/Dubai
# ll /etc/localtime
lrwxrwxrwx 1 root root 32 Apr 21 18:58 /etc/localtime -> ../usr/share/zoneinfo/Asia/Dubai
 
You need to use the ln command to set timezone on Centos 6. Type the following commands as root:
cp /etc/localtime /root/old.timezone
rm /etc/localtime
ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
Verify new settings by typing the following two commands:
date
ls -l /etc/localtime

Linux 修改时区

原文:https://www.cnblogs.com/rusking/p/10747682.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!