debian系统设置时间,时区

来源:互联网 发布:新剑侠情缘mac版 编辑:程序博客网 时间:2024/05/21 06:52

**************************************************************************
                                                       设置时间

**************************************************************************

etc/default/rcS

BIOS=本地时间,UTC=no
BIOS=UTC时间,UTC=yes 

 

 

安装ntpdate自动同步时间

aptitude install ntpdate
ntpdate pool.ntp.org

 

date命令手动设置时间

# date -s 05/04/2008
# date -s 11:11

 

把系统时间写入硬件:

hwclock --systohc

 

hwclock --show :显示硬件时间
hwclock --systohc :将系统时间写入硬件
hwclock --hctosys :将硬件时间写入系统时间

 

****************************************************************************

                                                    设置时区

****************************************************************************


编辑/etc/timezone,写入Asia/Shanghai

 

原创粉丝点击