【linux】修改机器时间
生活随笔
收集整理的這篇文章主要介紹了
【linux】修改机器时间
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
修改本地系統(tǒng)時(shí)間
//將時(shí)間改為10點(diǎn)10分 # date -s 10:10 //將日期改為2018年6月11日 # date -s 2018-06-11 //將日期改為2018年6月11日10點(diǎn)10分 # date -s '2018-06-11 10:10:00' //將日期改為2018年6月11日10點(diǎn)10分,并覆蓋硬件時(shí)間 # date -s '2018-06-11 10:10:00' && hwclock -w查看本地系統(tǒng)時(shí)間
# date查看硬件時(shí)間
# hwclock --show # hwclock系統(tǒng)時(shí)間覆蓋硬件時(shí)間
# clock -w # hwclock -w硬件時(shí)間覆蓋系統(tǒng)時(shí)間
# hwclock --hctosys設(shè)置硬件時(shí)間
//設(shè)置硬件時(shí)間為18年6月11日10點(diǎn)10分0秒 # hwclock --set --date '2018-06-11 10:10:00'查看系統(tǒng)時(shí)間
# timedatectl status ------------------------ Local time: 一 2018-07-23 10:39:31 CST Universal time: 一 2018-07-23 02:39:31 UTC RTC time: 一 2018-07-23 02:39:30 Timezone: Asia/Shanghai (CST, +0800) NTP enabled: no NTP synchronized: yes RTC in local TZ: no DST active: n/a- RTC time就是硬件時(shí)鐘的時(shí)間
總結(jié)
以上是生活随笔為你收集整理的【linux】修改机器时间的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 母菊花的功效与作用、禁忌和食用方法
- 下一篇: 打升级技巧大全