cao-lei

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

分类:

技术点:

相关文章:

  • 2021-05-31
  • 2022-01-19
  • 2021-04-30
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2022-02-10
  • 2022-01-01
猜你喜欢
  • 2021-12-25
  • 2021-07-21
  • 2021-10-20
  • 2021-12-19
  • 2021-12-21
  • 2022-01-13
相关资源
相似解决方案