Linux Update system time

Source: Internet
Author: User

First, the system time

1. Viewing the system time

[Email protected] ~]# datetue Dec  5 16:06:18 CST 2017

2. Set the system time

[[email protected] ~]# date-s 2017/12/5[[email protected] ~]# date-s 16:03:30

Second, hardware time

1. View Hardware time

[Email protected] ~]# clock--showtue 04:08:17 PM CST  -0.881128 seconds[[email protected] ~]# hwclock--s Howtue 04:08:23 PM CST  -0.114663 seconds

2. Set Hardware time

[Email protected] ~]# hwclock--set--date= "12/05/17 16:11" [[email protected] ~]# clock--set--date= "12/05/17 16:11"

Three, synchronization system and hardware time

Clock--SYSTOHC,HC represents the hardware time, SYS represents the system time, meaning to use the system time to synchronize hardware time;

Clock--hctosys, meaning to use hardware time to synchronize the system time.

[[email protected] ~]# clock--systohc[[email protected] ~]# clock--hctosys
[Email protected] ~]# clock--show
[[Email protected] ~]# Date

Linux Update system time

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.