[root@hexingxing ~]# date

# 查看系统日期/时间

[root@hexingxing ~]# ntpdate < 时间服务器>

# 同步服务器时间到系统
# 时间服务器:
## time.windows.com
## time.nist.gov

[root@hexingxing ~]# clock

# 查看硬件日期/时间

[root@hexingxing ~]# clock -w

# 同步系统时间到硬件时间

[root@hexingxing ~]# clock -s

# 同步硬件时间到系统时间

[root@hexingxing ~]# mv /etc/localtime /etc/localtime-bak
[root@hexingxing ~]# ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

# 备份默认时间文件并设置时区为本地时间/中国上海时间 CST

0 条评论

发表回复

Avatar placeholder

您的电子邮箱地址不会被公开。 必填项已用*标注