Permanent modification of system time under CentOS

Time:2019-11-6

When using CentOS, if the local time cannot be matched, directly click the command: date – s “2017-01-05 10:15:15” takes effect immediately, but after the restart, the system time is still the same.

After looking up the information, make a summary

My CentOS is installed on a virtual machine. There are subsystem time and hardware time in virtual machine. One of the changes is that there is no way to work and both must be changed.

1.date {view current local time}

2.hwclock –show{time to view hardware}

3. If the time of hardware is not right, modify the time of hardware

4.hwclock –set –date ‘014-12-15 15:15:15’Set hardware time {

5.hwclock  –hctosys {set system time and hardware time synchronization}

6.clock -wSave clock

7. Finally, by restarting,init 6 After a quick restart, check whether the system time really takes effect!!!! One

Recommended Today

Oracle (PLSQL) introduction 1

Oracle installation, user authorization, table operation, data type, DDL table, DML data. Next: Oracle introduction 2 Learning video: https://www.bilibili.com/video/BV1tJ411r7EC?p=15 Baidu cloud installation package is attached to the installation tutorial: https://blog.csdn.net/qq_ 40774525/article/details/79919057 Oracle Baidu cloud installation package: https://pan.baidu.com/s/1qVWwCUR37j2JxEecYbe5HQ Extraction code: 5abz After the Oracle service above is installed, open the client of SQL developer and the […]