Linux 设置时区
2018-02-22 15:57
316 查看
tzselect
将 UTC 改成CST
1. # tzselect
依次输入数字 5 9 1 1 设置为 China Standard Timezone
2. 永久化
You can make this change permanent for yourself by appending the line
TZ='Asia/Beijing'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
vi /etc/profile
添加 TZ='Asia/Beijing'; export TZ,之后 souce /etc/profile,使之生效
也可以一句话写完 :
echo "TZ='Asia/Beijing'; export TZ" >> /etc/profile; source /etc/profile
解释下: >> 为 追加,,> 是覆盖,慎用,此处用 >>
3. date 检查时区是否已更改
将 UTC 改成CST
1. # tzselect
依次输入数字 5 9 1 1 设置为 China Standard Timezone
2. 永久化
You can make this change permanent for yourself by appending the line
TZ='Asia/Beijing'; export TZ
to the file '.profile' in your home directory; then log out and log in again.
vi /etc/profile
添加 TZ='Asia/Beijing'; export TZ,之后 souce /etc/profile,使之生效
也可以一句话写完 :
echo "TZ='Asia/Beijing'; export TZ" >> /etc/profile; source /etc/profile
解释下: >> 为 追加,,> 是覆盖,慎用,此处用 >>
3. date 检查时区是否已更改
相关文章推荐
- Linux下时间/时区的设置
- 设置Linux系统的时区
- Linux 修改时间,时区和设置时间自动同步
- Linux下时区的设置
- linux设置时间为24小时制,设置时区
- Linux的时间和时区设置
- linux设置时区
- Linux查看设置系统时区
- Linux查看设置系统时区
- Linux 设置国内时区
- 转载:Linux查看设置系统时区
- linux系统时区设置
- [Linux] 设置系统时区
- Linux的时间和时区设置
- linux系统时区设置
- Linux下的时区设置格式
- linux vps如何修改时区 linux vps时区设置的方法
- linux设置时区
- Linux下时间/时区的设置,及MySQL配置时区设置
- Linux的时间和时区设置