Linux调整时区和同步时间

1.调整时区

tzselect

选择Asia -> China -> Beijing Time

 

2.设置为默认时区

cp -f /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

 

3.同步时间

sudo apt-get install ntpdate
ntpdate us.pool.ntp.org

 

4.测试

date -R

 

posted @ 2021-01-05 17:47  Clotho_Lee  阅读(208)  评论(0编辑  收藏  举报