Ubuntu18修改系統時間

1. 運行 tzselect

依次選擇 Asia -> China -> Beijing Time

image-20211215150054357

2. 複製文件到 /etc

sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

3. 查看當前時間、時區

date -R

image-20211215151221838

4. 同步網上時間

4.1 安裝 ntpdate

sudo apt install ntpdate

4.2 設置系統時間與網絡時間同步

sudo ntpdate cn.pool.ntp.org

5. 寫入硬件時間

sudo hwclock --systohc

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章