How To Change Timezone on Ubuntu 24.04 LTS
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.
- Click on the “Activities” button in the top-left corner of the screen.
- Type “Settings” in the search bar and click on the Settings icon.
- In the Settings window, scroll down and click on “Date & Time.”
- Toggle off the “Automatic Time Zone” switch if it’s enabled.
- Click on the “Time Zone” option.
- In the world map that appears, click on your desired location or use the search bar to find your city or timezone.
- 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:
- 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.
- 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.
- 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.