前言
突然发现我的CentOS6的时间跟当地时间不同,于是想着去矫正一下Linux的时间。
设置
- 删除localtime配置文件
rm /etc/localtime
- 把本地所在时区的配置文件复制到
/etc/
目录下cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
- 执行
ntpdate
命令ntpdate -u ntp.api.bz
- 写入内核时间
hwclock -w
- 查看时间是否更改
date 查看系统时间 hwclock 查看内核时间
成功修改
最新评论
我这边UI界面用React重写了,地址是 https://vps.kkwen.cn,有需要可以提供给你
Thankfulness to my father who told me concerning this webpage, this web site is genuinely remarkable