Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to modify the system time zone in Linux

Shulou Source: shulou.com Published: 2022-06-01 23:39:28 10月03日 Update

How to modify the system time zone in Linux? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.

1. View the system time

# date

You can see that the time zone is EST (US Eastern Standard time), and the normal display should be CST (China Standard time).

2. View the system time zone

# date-R

You can see that the output is

Fri, 21 Nov 2014 00:54:08-0500

Time zone is-5

The normal time zone should be displayed as + 8 (East Zone 8)

3. Make sure the network is smooth, DNS is parsed properly, and try to synchronize the Internet time.

# ntpdate cn.pool.ntp.org

4. View the system time zone configuration file

# cat / etc/sysconfig/clock

5. View the local system time zone configuration file

# strings / etc/localtime

6. Try to modify the system time zone

# tzselect

Select the correct time zone according to the prompts

7. If it can not be solved normally

# cp / usr/share/zoneinfo/Asia/Shanghai / etc/localtime

8. Check the system time zone and system time again, and it has been displayed normally

# date

# date-R

After reading the above, have you mastered the method of how to modify the system time zone in Linux? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Tags: System time zone time operating system content file method more standard standard time network problem try configure free unobstructed helpless to this end East Internet Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Redmi MariaDB Shulou Tech Info Shulou Technology