文章目录:

Linux(CentOS)时间设置

一、查看系统时间

 

使用 date 命令即可查看当前的系统时间:

date

 

二、手动设置时间

 

1、执行如下命令可以设置一个新的系统时间:

date -s "20190712 18:30:50"

2、设置完后还要执行如下命令将结果同步到硬件时钟:

hwclock --systohc

 

三、自动同步时间

 

1、首先安装 ntpdate 命令:

yum install -y ntpdate

2、与网络时间服务器同步:

ntpdate 0.asia.pool.ntp.org

其他时间服务器:

1)time.nist.gov

2)time.nuri.net

3)0.asia.pool.ntp.org

4)1.asia.pool.ntp.org

5)2.asia.pool.ntp.org

6)3.asia.pool.ntp.org

3、同步结果到硬件时钟,避免下次重启被还原

hwclock --systohc

 

posted @   网无忌  阅读(2889)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· DeepSeek “源神”启动!「GitHub 热点速览」
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· C# 集成 DeepSeek 模型实现 AI 私有化(本地部署与 API 调用教程)
· DeepSeek R1 简明指南:架构、训练、本地部署及硬件要求
· 2 本地部署DeepSeek模型构建本地知识库+联网搜索详细步骤
点击右上角即可分享
微信分享提示