本文由 简悦 SimpRead 转码, 原文地址 www.cnblogs.com
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. 再次查看时间
datehwclock
