Ubuntu使用tzselect修改时区
1、命令行运行
sudo tzselect
2、选择洲区(这里选择亚洲Asia)
waichung@desktop:~$ sudo tzselect
[sudo] password for waichung:
Please identify a location so that time zone rules can be set correctly.
Please select a continent or ocean.
) Africa
) Americas
) Antarctica
) Arctic Ocean
) Asia
) Atlantic Ocean
) Australia
) Europe
) Indian Ocean
) Pacific Ocean
) none - I want to specify the time zone using the Posix TZ format.
#?
3、选择国家(这里选择中国China)
Please select a country.
) Afghanistan ) Israel ) Palestine
) Armenia ) Japan ) Philippines
) Azerbaijan ) Jordan ) Qatar
) Bahrain ) Kazakhstan ) Russia
) Bangladesh ) Korea (North) ) Saudi Arabia
) Bhutan ) Korea (South) ) Singapore
) Brunei ) Kuwait ) Sri Lanka
) Cambodia ) Kyrgyzstan ) Syria
) China ) Laos ) Taiwan
) Cyprus ) Lebanon ) Tajikistan
) East Timor ) Macau ) Thailand
) Georgia ) Malaysia ) Turkmenistan
) Hong Kong ) Mongolia ) United Arab Emirates
) India ) Myanmar (Burma) ) Uzbekistan
) Indonesia ) Nepal ) Vietnam
) Iran ) Oman ) Yemen
) Iraq ) Pakistan
#?
4、选择北京时间
Please select one of the following time zone regions.
) Beijing Time
) Xinjiang Time
#?
5、选Yes
The following information has been given:
China
Beijing Time
Therefore TZ='Asia/Shanghai' will be used.
Local time is now: Thu May :: CST .
Universal Time is now: Thu May :: UTC .
Is the above information OK?
) Yes
) No
#?
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:
Asia/Shanghai
方式1:在用户目录的.profile文件中加入一行下列内容,然后source ~/.profile使其生效
export TZ='Asia/Shanghai'
方式2:复制相应的时区文件到/etc目录下
sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
6、同步时间
waichung@desktop:~$ sudo ntpdate pool.ntp.org
May :: ntpdate[]: adjust time server 193.228.143.14 offset -0.154279 sec
Ubuntu使用tzselect修改时区的更多相关文章
- ubuntu下如何修改时区和时间
1.修改时区 sudo tzselect (按提示选择即可) sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 2. 修改时间 sudo ...
- Ubuntu 14.04 修改时区
执行下面命令,并按照提示选择"Asia/Shanghai": sudo dpkg-reconfigure tzdata 正常执行结果为: Current default time ...
- Linux服务器修改时区时间
时间的一致性很关键,对于日志的分析和程序的对接都至关重要! 01.tzselect 修改时区 可以使用命令 tzselect,修改时区.操作示例: $ tzselect Please identify ...
- ubuntu server修改时区
公司用的是ubuntu server 服务器在美国亚马逊VPS 现在要修改时区 执行:tzselect 或直接修改 /etc/timezone 文件,我是改成(America/Los_Angeles) ...
- Linux —— 时间(tzselect、timedatactl命令,查看和修改时区,修改时区为东八区)【转】
转自:https://blog.csdn.net/weixin_42167759/article/details/90648225 一.设置linux修改时区首先查看当前时区 #date -R显示结果 ...
- Ubuntu修改时区和更新时间
先查看当前系统时间 root@ubuntu:/# date -R 结果时区是:-0500 我需要的是东八区,这儿显示不是,所以需要设置一个时区 1.运行tzselect root@ubuntu:/# ...
- ubuntu下修改时区
使用一个虚拟机服务,其时区设置的为格林兰标准时区,我北京时区在东八区,较其快八个小时. 修改时区需要执行 tzselect 一步步选择下来,注意确认后的information Therefore TZ ...
- ubuntu修改时区和时间的方法
改时区参考 http://blog.sina.com.cn/s/blog_6c9d65a1010145st.html 1.首先查看时区: swfsadmin@swfsubuntu:~$ date -R ...
- Ubuntu修改时区和时间
1.查看当前时区 date -R 返回显示是 +0000 2.修改时区 tzselect 然后提示选择时区,按顺序选4.9.1,然后确认选1 3.更新本地时区 sudo cp /usr/share/z ...
随机推荐
- 优化笔记:jsyhjkzqxx_D_20140916.gz
有几张表没有权限,所以跑不起来. 目测黄色部分比较坑爹,死了n多脑细胞才看懂,又死了n多脑细胞才改出来.对5034进行了2次扫描,并多次分组排序求和.(分组和排序算法相对来说比较耗性能) 改为只扫描一 ...
- nginx代理socket tcp/udp
准备一台linux服务器.nginx官网:http://nginx.org/ .在网上搜到大致用的是 ngx_stream_core_module 这个模块,这里你也可以关注一下官方文档中的其他模块都 ...
- Django-2的路由层(URLconf)
URL配置(URLconf)就像Django 所支撑网站的目录.它的本质是URL与要为该URL调用的视图函数之间的映射表:你就是以这种方式告诉Django,对于客户端发来的某个URL调用哪一段逻辑代码 ...
- linux shell find
find / -ctime +365 ! -name "*.bat" -exce rm -rf {} \;
- Linux重置管理员密码
对于一些非专业的Linux运维工程师或者偶尔使用Linux系统的学习者而言,比如我,经常会碰到忘记密码的尴尬,那这时候,快速的重置密码就相当重要了.废话不多说,今天我们就一起来学习一下如何快速重置密码 ...
- Quartz_2_简单编程式任务调度使用(CronTrigger)
第二个要介绍的任务调度器中的触发器是 CronTrigger ,相比较 SimpleTrigger 来说,CronTrigger 相对灵活,对于复杂的业务需求来说,更加的实用.要在使用 CronTri ...
- flume 转
http://blog.csdn.net/xiao_jun_0820/article/details/38111305
- Appium+python自动化-Remote远程控制
前言 在第三篇启动app的时候有这样一行代码driver = webdriver.Remote('http://192.168.1.1:4723/wd/hub', desired_caps),很多小伙 ...
- 621. Task Scheduler CPU任务间隔分配器
[抄题]: Given a char array representing tasks CPU need to do. It contains capital letters A to Z where ...
- 在centos6.3_64bit 上的GO语言开发环境搭建
1.下载go安装包 http://golang.org/ go1.2.linux-amd64.tar.gz 2.配置环境变量 3.编写helloworld package main import ...