Linux时间设置

时区

# 设置时区(上海)
timedatectl set-timezone Asia/Shanghai

# 启用时间同步
timedatectl set-ntp true

# 查看时区
timedatectl 

ntp

ntpdate -u 172.21.27.121 && hwclock --systohc

chronyd

#添加ntp服务器
/etc/chrony.conf
server 172.21.27.121 iburst

#重启服务
systemctl restart chronyd

#立即同步
chronyc makestep

#查看状态
chronyc tracking

使用Docker时宿主机iptables失效问题 2025-07-29
OSI参考模型 2025-07-28

评论区