How to Set the Time Zone Using the Linux Terminal
Setting the time zone correctly is one of the essential prerequisites for a stable Linux system. A wrong time zone can cause system errors and malfunctions that can affect the performance and accuracy of many system functions. In this article, we will discuss how to set the time zone for your Linux system using the Terminal.
Step 1: Checking the Current Time Zone
To check the current Time Zone on your Linux system, you can use the command “timedatectl”. This command provides you with a detailed output about the current date, time, and time zone set on your system. To execute this command, open the Terminal and type:
timedatectl
This command will return output similar to the following:
Local time: Mon 2020-11-16 12:17:59 EST
Universal time: Mon 2020-11-16 17:17:59 UTC
RTC time: Mon 2020-11-16 17:17:58
Time zone: America/New_York (EST, -0500)
System clock synchronized: yes
Here, under the “Time Zone” field, you can see the current time zone set on the system.
Step 2: Setting the Time Zone
To change the Time Zone on your Linux system, you have to use the command “timedatectl set-timezone” followed by the name of the Time Zone you want to set. You can find the list of available time zones at /usr/share/zoneinfo/. You have to navigate to the appropriate directory and select the time zone you want.
For example, if you want to set your time zone to New Delhi, India, you can use the following command in the Terminal:
timedatectl set-timezone Asia/Kolkata
Note that the “Asia/Kolkata” is the name of the time zone in the /usr/share/zoneinfo/ directory for New Delhi.
Step 3: Verifying the Time Zone
To verify that the time zone has been set correctly, you can again use the “timedatectl” command in the Terminal. Once you execute this command, check for the “Time Zone” field in the output, you should see the new time zone displayed.