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 ...
随机推荐
- <dl>
定义列表 自定义列表不仅仅是一列项目,而是项目及其注释的组合. 自定义列表以 <dl> 标签开始.每个自定义列表项以 <dt> 开始.每个自定义列表项的定义以 <dd&g ...
- python的一个小原理
在许多语言当中,类似于a.b()这样的调用方法是一个整体,但在Python中,它其实是两部分:获取属性a.b,调用().所以也可以写成: c = a.b c() 2.关于继承 class a: num ...
- File /data/binlog/mysql-bin.index' not found (Errcode: 13)
[问题] 需要开启bin-log备份/恢复数据库,但是因为本身bin-log保存的位置存储太小,并且归类性也不好,所以自己新创建了/data/binlog来保存二进制日志 在/etc/my.cnf增加 ...
- Java工具库:
1. 重试框架: https://docs.spring.io/spring-batch/trunk/reference/html/retry.html <dependency> < ...
- PHP 5.2、5.3、5.4、5.5、5.6 对比以及功能详解
php5.2.x php5.3.x php5.4.x php5.5.x php5.6.x 对比详解 截至目前(2014.2), PHP 的最新稳定版本是 PHP5.5, 但有差不多一半的用户仍在使用已 ...
- Java编程的逻辑 (20) - 为什么要有抽象类?
本系列文章经补充和完善,已修订整理成书<Java编程的逻辑>,由机械工业出版社华章分社出版,于2018年1月上市热销,读者好评如潮!各大网店和书店有售,欢迎购买,京东自营链接:http:/ ...
- poj 2253 一条路径中的最大边 再找出最小的
题目大意,有两只青蛙,分别在两个石头上,青蛙A想要到青蛙B那儿去,他可以直接跳到B的石头上,也可以跳到其他石头上,再从其他石头跳到B那儿,求青蛙从A到B的所有路径中最小的Frog Distance,我 ...
- awk 调用 shell 命令,并传递参数
from:awk 调用 shell 命令的两种方法:system 与 print shell 向awk传递命令,这样使用即可: awk -v ... 但反过来呢?awk调用外部命令,同时也传参呢? ...
- 【LOJ】#2548. 「JSOI2018」绝地反击
题解 卡常卡不动,我自闭了,特判交上去过了 事实上90pts= = 我们考虑二分长度,每个点能覆盖圆的是一段圆弧 然后问能不能匹配出一个正多边形来 考虑抖动多边形,多边形的一个端点一定和圆弧重合 如果 ...
- zabbix agent配置文件记录
一.无论主动还是被动模式都要配置server和linstenPort 二.若要设置主动模式那么要添加ServerActive,若不添加则默认为被动模式