Master time zone management and improve work efficiency

Source: Internet
Author: User
Tags time zones

Guide Time management skills in Linux machines, especially on production servers, are an extremely important aspect of system management, so here we will introduce the time management under Linux.

Linux contains a variety of time management tools available, such as date or timedatectlcommands, that you can use to get the current system time zone, or to synchronize the system times with the NTP server to automate and more accurately manage time. 1, we start with the traditional date command

Use the following command to see our current time zone:

$ date

Alternatively, you can use the following command. Where the%Z format can output time zones in the form of characters, and%Z output in digital form:

$ date + "%Z%Z"

Note: The date's hand album contains many output formats that you can use to replace the output of your date command:

$ man Date
2, Next, you can also use Timedatectl

When you run it without any parameters, this command can output the system time overview, which contains the current time zone, as shown in the following illustration:

$ timedatectl

You can then provide a pipe in the command, and then use the grep command to filter only the time zone information as follows:

$ timedatectl | grep "Time zone"


Again, we can learn how to use Timedatectl to set up the Linux time zone. 3, further, display the contents of the file/etc/timezone

displaying files using the Cat tool

/etc/timezone

To view your time zone:

$ cat/etc/timezone


For Rhel/centos/fedora users, here's another command that works the same way:

$ grep Zone/etc/sysconfig/clock


This article is reproduced from: http://www.linuxprobe.com/linux-timezone.html

Free to provide the latest Linux technology tutorials Books, for the open source technology enthusiasts to do more and better: http://www.linuxprobe.com/

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.