In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article focuses on "how to check the time zone in Linux". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to check the time zone in Linux.
In this short article, we will briefly introduce you to several simple ways to view the time zone of the system under Linux. Time management skills in Linux machines, especially on production servers, are an extremely important aspect of system management.
Linux includes a variety of available time management tools, such as date or timedatectlcommands, which you can use to obtain the current system time zone or to synchronize system time with NTP servers for automatic and more accurate time management.
OK, let's look at several different ways to view the time zone of our Linux system.
1. Let's start with using the traditional date command
Take a look at our current time zone using the following command:
$date
Alternatively, you can use the following command. Where the% Z format can output the time zone in the form of characters, and the% z can output the time zone in numeric form:
$date + "Z z"
Check the Linux time zone Note: the man page of date contains many output formats that you can use to replace the output of your date command:
$man date
2. Next, you can also use the timedatectl command
When you run it without any parameters, this command outputs an overview of the system time, including the current time zone, as shown in the following figure:
$timedatectl
You can then provide a pipe in the command and use the grep command to filter out only the time zone information as follows:
$timedatectl | grep "Time zone"
Looking at the current Linux time zone, we can also learn how to use timedatectl to set the Linux time zone.
3. Further, display the contents of the file / etc/timezone
Use the cat tool to display the contents of the file / etc/timezone to view your time zone:
$cat / etc/timezone
For RHEL/CentOS/Fedora users to view the time zone in Linux, here is another command that has the same effect:
Grep ZONE / etc/sysconfig/clock so far, I believe you have a better understanding of "how to view the time zone in Linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.