Introduction to modifying the system time method under Linux

Source: Internet
Author: User
Tags set time

If the system time is set to the December 9, 1999 command as follows.

#date-S 12/09/99
The command to set the system time to 2:18 P.M. 9 seconds is as follows.
#date-S 14:18:09

Date

The command can not only display the current time of the system, but can also use it to modify the system time.

The command format is:

Date-s time string such as modifying only the date of the system, not modifying the time (minutes and seconds)

Date-s 2012-08-02 or only modified time not modified date

Date-s 10:08:00 Of course you can also modify the date and time at the same time

Date-s "2012-05-18 04:53:00"

Note: Because there are spaces between the date and time, you must enclose them in quotation marks, otherwise the command will give an error.

The above modification only modifies the Linux system time, the CMOS time may have not changed, so for the insurance, need to use clock-w to write the current system time to the CMOS.


root operation user mode.

Method One:


Date 010318242008 (days of the Month) (full written)

Date 010318242008.30 (Month day, year.)

Method Two:

1 Set the date first

Date-s 20080103
2 "Set time

Date-s 18:24
+++++++++++++++++++++++++++++
If you want to change the BIOS time at the same time

Re-execution
Clock-w

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.