Debian下修改系统时间的方式

# 设置时区

# cp  /usr/share/zoneinfo/Asia/ShangHai  /etc/localtime     #时区为亚洲/上海

或 ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

# 网络校时

# apt-get install ntpdate

# ntpdate 210.72.145.44        # 中国国家时间服务器: 210.72.145.44

 

# 手动校时

# date -s 11/6/2008                #2008年11月6日

# date -s 10:05:30                  #10点05分30秒

# hwclock -w                          # 每次开机,系统会重新从BIOS获得时间,所以要BIOS时间同步系统时间

                                               # hwclock 位于 util-linux包内

 

# 自动网络校时

# crontab -u root -e

posted on 2020-07-02 19:22  剩余价值  阅读(4338)  评论(0编辑  收藏  举报

导航