####################
時區設定
####################
使用 tzconfig 來幫助設定
$ sudo dpkg-reconfigure tzdata
手動設定
範例:台北
$ sudo ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime

$ sudo cp /usr/share/zoneinfo/Asia/Taipei /etc/localtime

####################
時間設定
####################
讀取硬體時鐘
$ sudo hwclock -r --utc
$ sudo hwclock -r --localtime

硬體時鐘-->系統時間
設定系統顯示時間為硬體UTC時鐘
$ sudo hwclock --hctosys --utc
設定系統顯示時間為硬體Localtime時鐘
$ sudo hwclock --hctosys --localtime

系統時間-->硬體時鐘
設定硬體UTC時鐘為系統顯示時間
$ sudo hwclock --systohc --utc
設定硬體Localtime時鐘為系統顯示時間
$ sudo hwclock --systohc --localtime

NPT網路校時:
$ sudo apt-get install ntpdate
$ sudo ntpdate watch.stdtime.gov.tw

####################
其他
####################
查看日期與時間
$ date

查看日期/時間/時區
$ timedatectl
詳細指令
$ timedatectl --help

 

arrow
arrow
    全站熱搜

    Mint Fans 發表在 痞客邦 留言(0) 人氣()