Linux Time Management

Source: Internet
Author: User
Tags local time

/etc/sysconfig/clock

This profile can be used to set how the user chooses how to display the time. If the hardware clock is local time, UTC is set to 0, and the environment variable TZ is not set. If the hardware clock is UTC time, set the UTC to 1 and set the environment variable TZ (or profile/etc/tz) as the time zone information, such as "Asia/shanghai". Hwclock View Hardware clock: [[email protected]]$ hwclock–r/etc/localtime The system time zone of Linux is obtained by symbolic connection/etc/localtime. You can set the time zone by using the Tzset command, or you can set the time zone to Shanghai in Asia by using the command "Ln–s/etc/localtime/usr/share/zoneinfo/asia/shanghai". or execute Cp/usr/share/zoneinfo/asia/shanghai/etc/localtime directly if the system time is only synchronized through the NTP server, you can use the command ntpdate. The libraries used by Ntpdate include: Libcap.so.1 =/lib/libcap.so.1, libc.so.6 =/lib/tls/libc.so.6,/lib/ld-linux.so.2. View current time zone

Date–r

BusyBox's NTPD

Ntpd-p Ntp_server_addr-qnn

Hwclock–w

NTPD vs Ntpdate

Ntpdate directly adjusts the time to the specified server;

NTPD on the one hand can be the server, on the other hand gradually adjust the local time to align the superior server time.

Linux Time Management

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.