Linux modify system date and time

  

command format is:

date -s time string

For example, only modify the date of the system, do not modify the time (hours, minutes and seconds)

date -s 2014-10-02

or only modify the time without modifying the date

date -s 10:08:00

Of course you can also modify the date and Time

date -s “2014-10-02 04:53:00″

Note: Since there is a space between the date and time, it must be enclosed in quotation marks, otherwise the command will Reported an error.

The above modification only modifies the system time of linux. The time in CMOS may not have changed, so in order to insurance, you need to use clock -w to write the current system time to CMOS

Copyright © Windows knowledge All Rights Reserved