How to modify the system time in linux system and set it to not fail after restart

How to modify the system time in linux system and set it to not fail after restart

Hello everyone, this is Changqing~
We may encounter an incorrect time after the system transfer. It may be because of time problems that will cause some chain reactions in the future. Today Changqing will teach you how to modify the system time

We can first check the current system time

date

After confirmation, for example, we want to modify the time

date -s "15:06:00"

Date and time modified

date -s "2022-11-15 15:06:00"

Write the current time and date into BIOS to avoid invalidation after reboot

hwclock -w

or

hwclock --systohc

Guess you like

Origin blog.csdn.net/qq_42716761/article/details/127866426