ubuntu server设置时区和更新时间
1.首先查看时区:
beachboyy@ubuntu:~$ date -R Fri, 26 Feb 2016 16:54:59 -0800
2.选择区域:亚洲
如果要修改时区,执行sudo tzselect
beachboyy@ubuntu:~$ sudo tzselect
[sudo] password for beachboyy: Please identify a location so that time zone rules can be set correctly.Please select a continent or ocean. 1) Africa 2) Americas 3) Antarctica 4) Arctic Ocean 5) Asia 6) Atlantic Ocean 7) Australia 8) Europe 9) Indian Ocean10) Pacific Ocean11) none - I want to specify the time zone using the Posix TZ format.#? 5
3.选择国家:中国
Please select a country. 1) Afghanistan 18) Israel 35) Palestine 2) Armenia 19) Japan 36) Philippines 3) Azerbaijan 20) Jordan 37) Qatar 4) Bahrain 21) Kazakhstan 38) Russia 5) Bangladesh 22) Korea (North) 39) Saudi Arabia 6) Bhutan 23) Korea (South) 40) Singapore 7) Brunei 24) Kuwait 41) Sri Lanka 8) Cambodia 25) Kyrgyzstan 42) Syria 9) China 26) Laos 43) Taiwan 10) Cyprus 27) Lebanon 44) Tajikistan 11) East Timor 28) Macau 45) Thailand 12) Georgia 29) Malaysia 46) Turkmenistan 13) Hong Kong 30) Mongolia 47) United Arab Emirates 14) India 31) Myanmar (Burma) 48) Uzbekistan 15) Indonesia 32) Nepal 49) Vietnam 16) Iran 33) Oman 50) Yemen 17) Iraq 34) Pakistan #? 9
4.选择时区:北京时间
Please select one of the following time zone regions. 1) east China - Beijing, Guangdong, Shanghai, etc. 2) Heilongjiang (except Mohe), Jilin 3) central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc. 4) most of Tibet & Xinjiang 5) west Tibet & Xinjiang #? 1
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: Sat Feb 27 08:56:28 CST 2016. Universal Time is now: Sat Feb 27 00:56:28 UTC 2016. Is the above information OK? 1) Yes 2) No #? 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: Asia/Shanghai
改时间参考:
修改时间
sudo date -s MM/DD/YY //修改日期 sudo date -s hh:mm:ss //修改时间
在修改时间以后,修改硬件CMOS的时间
sudo hwclock --systohc //非常重要,如果没有这一步的话,后面时间还是不准
ubuntu server设置时区和更新时间相关推荐
- ubuntu server 修改时区
ubuntu server 修改时区 运行如下命令: sudo tzselect 然后选择Asia,输入4,然后enter 然后进入国家地区选择界面 这里选择China,输入9,然后enter 最后这 ...
- CentOS 修改系统时区和更新时间
修改时区 新安装 centOS 系统后,可能会出现由于时区问题,导致时间与现有正常时间相差 8 个小时的情况.我们可以通过相应的命令来重新设置时区. [root@master ~]# timedate ...
- Ubuntu server 设置root密码
ubuntu server安装的时候要你新建一个用户,安装完成后,你需要手动开启root. sudo passwd root 根据提示依次输入: 1.输入你当前用户的密码 2.输入你希望的root用户 ...
- Linux Shell脚本_设置时区并同步时间
① 脚本编写 vim autoSyncTime.sh 脚本内容: ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime if ! crontab ...
- Linux 修改时区和更新时间
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime or timedatectl set-timezone Asia/Shanghai
- mysql 数据表 时间自动_MySQL数据库时间设置自动添加时间和自动更新时间
MySQL字段中设置时间字段自动添加创建时间和自动更新时间设置, 设置字段类型为:timestamp 默认值设置为current_timestamp(), 更新时间字段字段类型为:timestamp ...
- 在树莓派计算模块CM4上安装Ubuntu Server 20.04
陈拓 2021/10/26-2021/12/09 1. 概述 Ubuntu Server 21.10只支持到2022年7月,而20.04支持到2025年4月.如果做产品开发还是选择20.04版好一些. ...
- Ubuntu Server 20.04 LTS:稳定性,安全性及更多
原文:https://ubuntu.com/blog/ubuntu-server-20-04 Ubuntu Server 20.04 LTS(长期支持)具有企业级的稳定性,弹性和更好的安全性.作为LT ...
- mysql中创建时间和更新时间的区别
`create_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',`update_time` timestamp(0) ...
最新文章
- python美多商城项目百度网盘_美多商城项目(七)
- Apache Derby数据库用户和权限
- seaborn绘图入门1(lineplot+barplot+heatmap+scatterplot)
- python项目开发实例-《Python项目案例开发从入门到实战》PDF版百度网盘
- 如何在 iPhone、iPad、Mac 和 PC 上设置 iCloud 照片共享?
- 解决报错(4种情况):0x00007FF614F73B96 处(位于 XXX.exe 中)引发的异常: Microsoft C++ 异常: cv::Exception,位于内存位置 0x000XXX
- 听说C站还有人缺图片素材?一篇跟UI设计师要来的——图片网址整理大全 让你从此远离素材荒!(强烈建议收藏)
- 【Java-GC】集合Collection的clear()和GC垃圾回收测验
- GAMIT数据的下载与准备
- 神鬼传奇客户端解包图片(ui\common)
- python中的Pickle文件和npy文件
- 时间的流逝,流逝了谁的无奈?
- python文件查重_文件查重 我使用的是面向局部敏感的最小哈希签名的方法进行文档查重 联合开发网 - pudn.com...
- cacti 画图 断续问题处理
- 什么才是真正的云主机?辨别真假云主机
- 数据分析学习笔记2020/7/20——matplotlib绘制条形图
- Android 集成子模块 Missing required view with ID: com.kvdmoviesworld.android:id/
- springboot整合xwpf将world转为pdf
- 记录一次详细在线加密PDF解密过程
- editplus安装破解和网盘文件连接制作