Set and modify CentOS System Time Zone

Source: Internet
Author: User

When we use the CentOS system to set and modify the CentOS system time zone, problems may occur frequently in the time zone, and sometimes errors may occur after the change. Next we will learn a way to change this situation. If you are not using CentOS, run the command yum install ntp and then: ntpdate us.pool.ntp.org. Because the CentOS system is re-compiled with the source code of rhas, many places are exactly the same. The Time Zone of rhas5 exists as a file. The current time zone file is in/etc/localtime. Where are files stored in other time zones? In/usr/share/zoneinfo, we use UTC + 8, Beijing, and Shanghai time # cp-f/usr/share/zoneinfo/Asia/Shanghai/etc/localtime # After reboot is restarted, date to view the time, view the current time zone date-R, view/modify the Linux time zone and time 1, Time Zone 1. view the current time zone date-R2. modify and set the time zone method (1) tzselect method (2) Limited to RedHat Linux and CentOS system timeconfig method (3) applicable to Debiandpkg-reconfigure tzdata 3. copy the corresponding time zone file to replace the CentOS System Time Zone file, or create the link file cp/usr/share/zoneinfo/$ main Time Zone/$ Time Zone/etc/localtime which can be used in China: cp/usr/share/zoneinfo/Asia/Shanghai/etc/loc Altime 2, time 1, view the time and date date2, set the time and date to set the CentOS system date to the command date-s June 10, 1996/96 on January 1, 06/22 set the CentOS system time to 01:52:00 P.M. date-s. write the current time and date to the BIOS, avoid Failure after restart hwclock-w III. Scheduled synchronization time #/usr/sbin/ntpdate 210.72.145.44>/dev/null 2> & 1 so that we have completed the settings to modify the CentOS System Time Zone.

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.