网站首页 > 技术教程 正文
已亲测好用:
1、查看当前时间:
date
2、更改系统时间时区:
timedatectl set-timezone Asia/Shanghai
其他同步时间的解决方法(不好用可参考思路):
1、vi /etc/sysconfig/clock #编辑文件
ZONE="Asia/Shanghai"
UTC=false #设置为false,硬件时钟不于utc时间一致
ARC=false
2、ln -sf
/usr/share/zoneinfo/Asia/Shanghai /etc/localtime #linux的时区设置为上海
3、ntpdate asia.pool.ntp.org #对准时间,需要先安装ntp服务器 yum install ntp
4、/sbin/hwclock --systohc #设置硬件时间和系统时间一致并校准
猜你喜欢
- 2025-05-08 Linux高性能服务器设计(linux高性能服务器编程:使用muduo c++网络库)
- 2025-05-08 linux实例之设置时区的方式有哪些
- 2025-05-08 CentOS7下使用Lsyncd实现文件实时同步
- 2025-05-08 Redis数据持久化机制、主从同步原理、常见规范与优化详解
- 2025-05-08 linux服务器开发之网关服务器的实现
- 2025-05-08 耗时很长的程序忘加nohup就运行了怎么办?
- 2025-05-08 手绘10张图,细谈Redis 持久化,详解RDB和AOF及混合机制
- 2025-05-08 开源的Linux文件同步工具有哪些?(linux 文件同步方案)
- 2025-05-08 如何使用Rsync同步两个网站服务器的内容
- 2025-05-08 闰秒使网络暂时中断(闰秒使网络暂时中断什么意思)
你 发表评论:
欢迎- 08-03Linux SSH开启密钥登录 禁止Root用户登录
- 08-03从零开始的安卓Root教程
- 08-03Linux下 sudo命令
- 08-03Linux sudo命令9.3分高危漏洞被修复:可提权至root级别
- 08-03Linux忘记root密码了怎么办
- 08-03AWS EC2 Amazon Linux 2023 改root密码
- 08-03Linux系统中root用户无法创建文件夹
- 08-03linux用户管理命令passwd(仅root用户可用)
- 最近发表
- 标签列表
-
- 下划线是什么 (87)
- 精美网站 (58)
- qq登录界面 (90)
- nginx 命令 (82)
- nginx .http (73)
- nginx lua (70)
- nginx 重定向 (68)
- Nginx超时 (65)
- nginx 监控 (57)
- odbc (59)
- rar密码破解工具 (62)
- annotation (71)
- 红黑树 (57)
- 智力题 (62)
- php空间申请 (61)
- 按键精灵 注册码 (69)
- 软件测试报告 (59)
- ntcreatefile (64)
- 闪动文字 (56)
- guid (66)
- abap (63)
- mpeg 2 (65)
- column (63)
- dreamweaver教程 (57)
- excel行列转换 (56)
本文暂时没有评论,来添加一个吧(●'◡'●)