Linux修改时区(tzselect) 【例子:修改时区 为 中国 东8区 的时间】

文章连接:https://blog.csdn.net/sxzlc/article/details/115792270

=======

扩展:

使用Linux的tzselect功能,查看各个洲都有哪些国家(地区)

https://blog.csdn.net/sxzlc/article/details/115792692

=======

 

1.查看当前时区

 

2.执行tzselect命令,

3.选择你的国家(地区)所在的洲(亚洲,输入4)

4.选择你的国家(地区)

中国 9

5.选择地区

北京1

6.确认

Yes 1

You can make this change permanent for yourself by appending the line
        TZ='Asia/Shanghai'; export TZ
to the file '.profile' in your home directory; then log out and log in again.

Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:

7.用上面获得的【Asia/Shanghai】来修改时区

timedatectl set-timezone 'Asia/Shanghai'

===

需要使用管理者权限执行

8.再次查看时间,已经是当前时区的时间了

===

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值