Knowledge Base

HomepageKnowledge BaseHow to Change the Time Zone in Ubuntu Using th...

How to Change the Time Zone in Ubuntu Using the Terminal

1. Check the Current Time Zone

Start by verifying your server’s current time, date, and time zone:

Code
 
timedatectl

This command displays:

  • Local time

  • Universal time (UTC)

  • Current time zone

  • NTP synchronization status

This helps confirm whether a change is required.

 

2. List All Available Time Zones

Ubuntu includes hundreds of time zones. To view the full list:

Code
 
timedatectl list-timezones

If you want to filter by region (e.g., Asia):

Code
 
timedatectl list-timezones | grep Asia

This makes it easier to find the exact zone you need, such as Asia/Kolkata.

 

3. Set a New Time Zone

Once you identify the correct time zone, apply it using:

Code
 
sudo timedatectl set-timezone Region/City

Examples:

Code
 
sudo timedatectl set-timezone Asia/Kolkata
sudo timedatectl set-timezone America/New_York
sudo timedatectl set-timezone UTC

The change is applied instantly and does not require a reboot.

 

4. Verify the Updated Time Zone

Run the following again to confirm:

Code
 
timedatectl

You should now see the updated time zone reflected in the output.

 

5. Alternative Method (If timedatectl Is Not Available)

Some minimal installations or containers may not include timedatectl. In such cases, you can reconfigure the time zone using:

Code
 
sudo dpkg-reconfigure tzdata

This opens a menu-based interface where you can select your region and city.

 

6. Manual Method (Advanced Users)

You can also manually link the appropriate zoneinfo file:

Code
 
sudo ln -sf /usr/share/zoneinfo/Region/City /etc/localtime

Example:

Code
 
sudo ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime

This method is less common but useful in restricted environments.

Can't find the information you are looking for?

Create a Support Ticket
Did you find it useful?
(5 times viewed / 0 people found it helpful)

Top