时区时间设置
常见时区
UTC 整个地球分为二十四时区,每个时区都有自己的本地时间。在国际无线电通信场合,为了统一起见,使用一个统一的时间,称为通用协调时(UTC, Universal Time Coordinated)。 GMT 格林威治标准时间 (Greenwich Mean Time)指位于英国伦敦郊区的×××格林尼治天文台的标准时间,因为本初子午线被定义在通过那里的经线。(UTC与GMT时间基本相同,本文中不做区分) CST 中国标准时间 (China Standard Time) GMT + 8 = UTC + 8 = CST DST夏令时(Daylight Saving Time) 指在夏天太阳升起的比较早时,将时间拨快一小时,以提早日光的使用。(中国不使用)
时区和时间设置
timedatectl #查看系统时间方面的各种状态 timedatectl list-timezones #查看时区列表 timedatectl set-timezone Asia/Shanghai #把时区改成上海 timedatectl set-local-rtc 1 #将硬件时钟调整为与本地时钟一致, 0为设置为UTC时间 timedatectl set-time “2021-04-15 15:50:20” #设置时间 timedatectl set-ntp true/flase #是否开启ntp
授时中心
210.72.145.44 国家授时中心 ntp.aliyun.com 阿里云 s1a.time.edu.cn 北京邮电大学 s1b.time.edu.cn 清华大学 s1c.time.edu.cn 北京大学 s1d.time.edu.cn 东南大学 s1e.time.edu.cn 清华大学 s2a.time.edu.cn 清华大学 s2b.time.edu.cn 清华大学 s2c.time.edu.cn 北京邮电大学 s2d.time.edu.cn 西南地区网络中心 s2e.time.edu.cn 西北地区网络中心 s2f.time.edu.cn 东北地区网络中心 s2g.time.edu.cn 华东南地区网络中心 s2h.time.edu.cn 四川大学网络管理中心 s2j.time.edu.cn 大连理工大学网络中心 s2k.time.edu.cn CERNET桂林主节点 s2m.time.edu.cn 北京大学 ntp.sjtu.edu.cn 202.120.2.101 上海交通大学
时间同步
ntpdate ntp1.aliyun.com #时间同步 hwclock -w #硬件时钟同步
设置语言环境
localectl set-locale LANG=zh_CN.utf8