Linux修改系统时间为东八区北京时间(上海时间)
2024-08-28 03:21:30
1. Linux时间
Linux的时间分为 System Clock(系统时间)和 Real Time Clock(硬件时间,简称RTC)。
系统时间:指系统内核中的时间。
硬件时间:指主板上的时间。
2. 查看系统时间
date
3. 查看硬件时间
hwclock
4. 删除本地时间
rm -rf /etc/localtime
5. 创建软连接
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
6. 时间同步(阿里服务器时间)
ntpdate ntp1.aliyun.com
7. 若提示 command not found,则安装
yum -y install ntp ntpdate
8. 校准硬件时间和软件时间一致
/sbin/hwclock --systohc
9. 再次查看时间
date
hwclock
最新文章
- qt creator 源代码中含有中文编译报错
- 小meta的大作用
- 【Cocos2d-x】VS2012开发2dx无法解析的外部符号解决记录(第一篇)【转】
- line-height 与垂直居中!
- 误删除了Oracle的dbf文件后的解决方法
- 我们说的oc是动态运行时语言是什么意思?
- android 有效载荷大图,避OOM
- 非滤波单目视觉slam笔记1
- Maven服务器搭建
- vue 使用Jade模板写html,stylus写css
- Java学习之Java接口回调理解
- 2018-2019-2 《网络对抗技术》Exp6 信息搜集与漏洞扫描 20165326
- poj1456 Supermarket
- vue作用域 this
- 20155216 Exp6 信息搜集与漏洞扫描
- linux多路径配置
- 笔记01 登录、常用配置参数、Action访问Servlet API 和设置Action中对象的值、命名空间和乱码处理、Action中包含多个方法如何调用
- python常用库之base64
- Oracle中的rownum不能使用大于>;的问题
- 【BZOJ】2982 combination
热门文章
- 各种有趣vbs,bat脚本
- kafka SASL认证介绍及自定义SASL PLAIN认证功能
- 阿里云的nginx的https配置问题
- 如何使用会声会影制作动态logo字幕
- FL studio系列教程(十二):FL Studio中如何导出音频
- Codeforces Round #674 (Div. 3)
- modelviewset与apiview
- flask:蓝图--blueprint
- 第7.16节 案例详解:Python中classmethod定义的类方法
- Python使用import导入模块时执行了模块的文件但报ModuleNotFoundError错误的愚蠢问题