ubuntu修改时区和时间的方法
改时区参考
http://blog.sina.com.cn/s/blog_6c9d65a1010145st.html
1.首先查看时区:
swfsadmin@swfsubuntu:~$ date -R
Tue, Dec :: +
如果要修改时区,执行sudo tzselect
2.选择区域:亚洲
swfsadmin@swfsubuntu:~$ sudo tzselect
[sudo] password for swfsadmin:
Sorry, try again.
[sudo] password for swfsadmin:
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.选择国家:中国
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.
) east China - Beijing, Guangdong, Shanghai, etc.
) Heilongjiang (except Mohe), Jilin
) central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.
) most of Tibet & Xinjiang
) west Tibet & Xinjiang
#?
5.确认验证:
The following information has been given:
China
east China - Beijing, Guangdong, Shanghai, etc.
Therefore TZ='Asia/Shanghai' will be used.
Local time is now: Tue Dec :: CST .
Universal Time is now: Tue Dec :: 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
改时间参考:
http://5154091.blog.hexun.com/30735220_d.html
修改时间
sudo date -s MM/DD/YY //修改日期
sudo date -s hh:mm:ss //修改时间
在修改时间以后,修改硬件CMOS的时间
sudo hwclock --systohc //非常重要,如果没有这一步的话,后面时间还是不准
http://www.cnblogs.com/php5/archive/2011/02/15/1955432.html
http://os.51cto.com/art/200908/142234.htm
ubuntu修改时区和时间的方法的更多相关文章
- Ubuntu修改时区和时间
1.查看当前时区 date -R 返回显示是 +0000 2.修改时区 tzselect 然后提示选择时区,按顺序选4.9.1,然后确认选1 3.更新本地时区 sudo cp /usr/share/z ...
- Ubuntu 修改时区和时间
tzselect #根据提示选择时区 sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime #把设置好的时区文件粘贴到 /etc/local ...
- 修改linux系统时间的方法(date命令)
修改linux系统时间的方法(date命令) 来源:互联网 作者:佚名 时间:11-18 23:22:27 [大 中 小] date命令不仅可以显示系统当前时间,还可以用它来修改系统时间,下面简单的介 ...
- Ubuntu修改时区和更新时间
先查看当前系统时间 root@ubuntu:/# date -R 结果时区是:-0500 我需要的是东八区,这儿显示不是,所以需要设置一个时区 1.运行tzselect root@ubuntu:/# ...
- ubuntu下如何修改时区和时间
1.修改时区 sudo tzselect (按提示选择即可) sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 2. 修改时间 sudo ...
- centos修改时区,设置时间
在我们使用CentOS系统的时候,也许时区经常会出现问题,有时候改完之后还是会出错,下面我们就来学习一种方法来改变这个状况.如果没有安装,而你使用的是 CentOS系统 那使用命令 yum insta ...
- mysql修改时区的几种方法(转载自https://www.cnblogs.com/shiqiangqiang/p/8393662.html)
说明: 以下记录修改mysql时区的几种方法. 具体: 方法一:通过mysql命令行模式下动态修改 1.1 查看mysql当前时间,当前时区 select curtime(); #或select no ...
- ubuntu系统调整时区和时间
date: 2019-05-30 10:14:23 author:headsen chen 个人原创博客,转录需要注明作者和出处. 1,安装ntpdate,同步标准时间 root@hk-confl ...
- mysql修改时区的几种方法
说明: 以下记录修改mysql时区的几种方法. 具体:方法一:通过mysql命令行模式下动态修改1.1 查看mysql当前时间,当前时区 > select curtime(); #或select ...
随机推荐
- Spark笔记之Catalog
一.什么是Catalog Spark SQL提供了执行sql语句的支持,sql语句是以表的方式组织使用数据的,而表本身是如何组织存储的呢,肯定是存在一些元数据之类的东西了,Catalog就是Spark ...
- centos7,php7 安装mysqli扩展
首先安装MySQL https://www.cnblogs.com/manzb/p/9560403.html php7安装后没有安装mysqli扩展的话: 安装mysqli扩展 1.到php文件e ...
- 关联查询resultMap使用规则总结——(十一)
resultType: 作用: 将查询结果按照sql列名pojo属性名一致性映射到pojo中. 场合: 常见一些明细记录的展示,比如用户购买商品明细,将关联查询信息全部展示在页面时,此时可直接使用re ...
- rtop:一个通过 SSH 监控远程主机的交互式工具【转】
编译自: http://www.tecmint.com/rtop-monitor-remote-linux-server-over-ssh/ rtop[1] 是一个基于 SSH 的直接的交互式远程系统 ...
- IIS 无法识别的属性“targetFramework”---解决之道
在安装VS2010后,应用.NET Framework 4创建的网站放在IIS(7.0)下会出现如下的错误: 其中的“版本信息”中告诉了我们.NET Framework和ASP.NET的版本都是2.0 ...
- Win7下如何使用GCC编译器
很多Linux的爱好者都很熟悉GCC编译器,但是对面初学者,如何去学习GCC使用GCC ,很多人都是直接在电脑上装一个虚拟机,这样不仅安装麻烦,而且占用了很多电脑资源,今天我来教大家如何在Win7使用 ...
- Mockito 简明教程
什么是 Mock 测试 Mock 测试就是在测试过程中,对于某些不容易构造(如 HttpServletRequest 必须在Servlet 容器中才能构造出来)或者不容易获取比较复杂的对象(如 JDB ...
- RSS新手必读
当谷歌停止Google Reader后,我开始玩RSS Reader了.网上大抵说Google Reader的退出很可惜,不过替代品还是存在的. 作为一个newbie我的视野或许很局限不过还是说几 ...
- SVN使用过程中遇到的一些问题
更新svn的客户端TortoiseSVN后 ,之前使用svn管理的文件的关联图标消失了 说明:下面的解决方法及图片来自博客:装了SVN,你的关联图标变了没有? 解决办法:在同步的文件点击右键如下图 ...
- hdu 5053 (2014上海网赛L题 求立方和)
题目大意:给你L到N的范围,要求你求这个范围内的所有整数的立方和. Sample Input2 //T1 32 5 Sample OutputCase #1: 36Case #2: 224 # inc ...