How to Set or Change the Time Zone in Linux
Checking the Current Time Zone
1 |
|
Changing the Time Zone in Linux
Before changing the time zone, you’ll need to find out the long name of the time zone you want to use. The time zone naming convention usually uses a “Region/City” format.
To view all available time zones, use the timedatectl
command or list the files in the /usr/share/zoneinfo
directory:
1 |
|
Once you identify which time zone is accurate to your location, run the following command as root or sudo user:
1 |
|
For example, to change the system’s timezone to Asia/Shanghai
you would type:
1 |
|
To verify the change, invoke the timedatectl command again:
1 |
|
NTP Server
1 |
|
How to Set or Change the Time Zone in Linux
https://www.hardyhu.cn/2022/01/26/How-to-Set-or-Change-the-Time-Zone-in-Linux/