CentOS System Time Setting Method

Source: Internet
Author: User

CentOS System Time Setting Method

For linux systems, there are three ways to set the system time:
1. Take the local time as the system time;
2. the system time is based on the UTC world time partition standard;
3. Time Based on NTP time coordination server;

Three time settings are described as follows:

1. Set the local time command to clock or hwclockg. The system folder is/etc/localtime.

Command description:

Hwclock/clock-w saves the current system time as the hardware time.


Hwclock/clock -- set -- date "03/17/2009 13:26:00"


Hwclock/clock -- show Displays the current hardware time


Hwclock/clock -- hctosys hardware time synchronization is system time


Hwclock/clock-systohc system time synchronization is hardware time

2. the UTC time setting command is timeconfig. The graphic setting box on the text interface is started. Its configuration file is saved in/etc/sysconfig/clock.

3. The NTP settings must be set on the server side and on the client side. Configure the NTP server. The configuration file is/etc/ntp. conf.

After the configuration is complete, service ntpd start starts the server


Query the NTP server in the Network: ntpq-p


NTP synchronization time: ntpdate ntpserver (ip address or domain name)

--------------------

Common system time setting methods:

Date-s 12/25/2013 (December 25, 2013)
Date-s 15:55:33)
Clock-w

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.