Modify time and time zone under Linux

Source: Internet
Author: User

First, the time to modify Linux
Under root user, use the date command: date-s
1. Only modify the date, do not modify the time, enter:

-Geneva-

2. Modify the time only, enter:

:xx 

3. Also modify the date time, note to add single/double quotation marks, date and time there is a space between, enter:

" 2015-03-06 14:15:00 "

4, after the modification, the system time to write to the CMOS, input:

Clock-w


Second, modify the time zone does not restart
Under the root user
Copy the appropriate time zone file and replace the system time zone file:

cp/usr/share/zoneinfo/$ main time zone/$ times time zone/etc/localtime

For example:

Cp/usr/share/zoneinfo/asia/shanghai/etc/localtime

Modify time and time zone under Linux

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.