UbuntuUbuntu Based

How To Change Timezone on Ubuntu 24.04 LTS

Change Timezone on Ubuntu 24.04

In this tutorial, we will show you how to change the Timezone on Ubuntu 24.04 LTS. Timezones are geographical areas that share the same standard time. They’re essential for coordinating activities across different parts of the world. Ubuntu, like other Linux distributions, manages timezones through a combination of system files and utilities.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step change change the Timezone on Ubuntu 24.04 (Noble Numbat). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.

Prerequisites

  • A server running one of the following operating systems: Ubuntu and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies.
  • An Ubuntu 24.04 system with root access or a user with sudo privileges.

Change Timezone on Ubuntu 24.04

Step 1. Checking the Current Timezone

Before making any changes, it’s crucial to know your current timezone setting. Ubuntu provides a simple command-line tool for this purpose:

timedatectl

This command displays comprehensive information about your system’s time and date settings, including the current timezone. The output might look like this:

               Local time: Mon 2024-07-08 10:30:45 EDT
           Universal time: Mon 2024-07-08 14:30:45 UTC
                 RTC time: Mon 2024-07-08 14:30:45
                Time zone: America/New_York (EDT, -0400)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

In this example, the timezone is set to America/New_York. Understanding your current timezone is crucial for making informed decisions about changes and troubleshooting potential issues.

Step 2. Change Timezone in Ubuntu 24.04 LTS

Ubuntu 24.04 LTS offers multiple methods to change the timezone, catering to both graphical and command-line preferences. Let’s explore each method in detail.

  • Using the Graphical User Interface (GUI)

For users who prefer a visual approach, Ubuntu’s Settings menu provides an intuitive way to change the timezone.

  1. Click on the “Activities” button in the top-left corner of the screen.
  2. Type “Settings” in the search bar and click on the Settings icon.
  3. In the Settings window, scroll down and click on “Date & Time.”
  4. Toggle off the “Automatic Time Zone” switch if it’s enabled.
  5. Click on the “Time Zone” option.
  6. In the world map that appears, click on your desired location or use the search bar to find your city or timezone.
  7. Once selected, close the Settings window. The changes will take effect immediately.

This method is straightforward and doesn’t require any command-line knowledge, making it accessible for all users.

  • Using the Command Line Interface (CLI)

For system administrators or users comfortable with the terminal, Ubuntu offers powerful command-line tools for timezone management.

The timedatectl Command √

The timedatectl command is the primary tool for managing time and date settings in Ubuntu:

To list available timezones:

timedatectl list-timezones

This command outputs a long list of timezones. You can filter it using grep:

timedatectl list-timezones | grep America

To set a new timezone:

sudo timedatectl set-timezone America/Chicago

Replace “America/Chicago” with your desired timezone. Verify the change by running timedatectl again.

  • Manually Changing the /etc/localtime Symlink

For a more hands-on approach, you can manually change the /etc/localtime symlink:

ls /usr/share/zoneinfo

Create the new symlink:

sudo ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime

Verify the change:

ls -l /etc/localtime

This should show the new symlink pointing to your chosen timezone file.

Using the tzselect Command √

The tzselect command offers an interactive way to select a timezone:

tzselect

Follow the prompts to select your continent, country, and specific timezone. Note that this command only suggests the correct timezone setting and doesn’t actually change the system timezone.

Step 3. Troubleshooting Common Issues.

Even with Ubuntu’s robust time management system, issues can occasionally arise. Here are some common problems and their solutions:

  1. Timezone Not Updating: If the timezone doesn’t seem to update after a change, try rebooting the system. If the issue persists, verify that you have the necessary permissions and that the timezone file exists.
  2. Conflicts Between System and User Timezones: When user-specific timezones conflict with the system timezone, it can lead to confusion. Ensure that user-specific settings are necessary and properly documented.
  3. Timezone Abbreviation Conflicts: Some timezone abbreviations are used by multiple timezones. Always use the full timezone name (e.g., ‘America/New_York’ instead of ‘EST’) to avoid ambiguity.

Congratulations! You have successfully changed the Change Timezone. Thanks for using this tutorial Change Timezone on the Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the official Ubuntu website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button