Ubuntu 24.04: Change timezone

Whether you’re a seasoned Ubuntu user or new to the operating system, understanding how to manage your system’s timezone is essential for ensuring that your computer’s clock is accurate, which is crucial for many applications and tasks. Adjusting the timezone in Ubuntu can be done through both the Graphical User Interface (GUI) and the Command Line Interface (CLI), allowing users flexibility based on their preference or needs.

In this tutorial you will learn:

  • How to change the timezone in Ubuntu 24.04 using the GUI
  • How to change the timezone in Ubuntu 24.04 using the CLI
How to Change the Timezone in Ubuntu 24.04
How to Change the Timezone in Ubuntu 24.04
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu 24.04 LTS
Software No specific software required
Other Internet connection for time synchronization (optional)
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

Changing the Timezone in Ubuntu 24.04

Follow these steps to change your system’s timezone. We’ll cover both methods starting with the GUI approach, which is user-friendly and straightforward, then move on to the CLI method, which is more suited for advanced users or those who prefer working within the terminal.

  1. Changing Timezone via GUI: Start by opening the Settings application from the application menu.
  2. Open the Settings application: Navigate to the application menu and launch the Settings.
    Open Settings > Date & Time
    This action opens the system settings where you can adjust various configurations, including the timezone.
  3. Adjust Date & Time settings: In the Settings menu, find and select Date & Time from the left sidebar.
    Scroll and click on Date & Time
    Here, you will see options related to your system’s time configuration.
  4. Disable Automatic Time Zone: If enabled, toggle off the Automatic Time Zone option to enable manual timezone selection.
    Toggle off Automatic Time Zone
    This action allows you to choose a timezone manually.
  5. Select the Time Zone: Click on Time Zone, then search for and select your desired city or timezone.
    Search and select timezone
    Upon selection, your system’s timezone will automatically update.

    Changing Timezone via GUI
    Changing Timezone via GUI


Changing Timezone via CLI (command line interface)

  1. Open your terminal to begin the CLI process.: Enter the following command:
    $ timedatectl

    Check your current timezone with the timedatectl command.

  2. Find your Timezone: Use timedatectl to list timezones or grep to filter for your city.
    $ timedatectl list-timezones | grep Kathmandu

    This command helps you find the exact timezone you wish to set.

  3. Set New Timezone: Apply the change by setting your system to the new timezone.
    $ sudo timedatectl set-timezone Asia/Kathmandu

    This command updates your system’s timezone.

  4. Confirm Timezone Settings: Verify the change by checking your system’s timezone again.
    $ timedatectl

    This will display your system’s current timezone settings, confirming the update.

    Changing Timezone via CLI (command line interface)
    Changing Timezone via CLI (command line interface)

Conclusion

By following the steps outlined above, you can easily change the timezone in Ubuntu 24.04 using either the GUI or CLI. Whether you’re setting up a new system, traveling, or need to adjust your computer’s clock for any other reason, Ubuntu makes it simple to ensure your time settings are accurate.

FAQ

1. How can I find out the current time in a specific timezone?
You can use the command timedatectl with the option set-timezone followed by the timezone you’re interested in to see the current time there. Alternatively, numerous online tools and websites provide current times for various timezones.
2. What should I do if my city is not listed in the timezone options?
When a specific city is not listed, you should select the nearest city in your timezone. Timezones cover broader regions, so cities within the same timezone will share the same time.
3. Can daylight saving time affect how I set my timezone in Ubuntu?
Yes, daylight saving time (DST) can affect timezone settings. Ubuntu automatically adjusts for DST if your timezone supports it. Ensure the ‘Network Time’ is enabled for automatic adjustments.
4. How does Ubuntu determine my current timezone automatically?
Ubuntu uses the ‘geoclue’ service to determine your location and set the timezone automatically. This requires an active internet connection and location services to be enabled.
5. Is it possible to have different time settings for different users on the same Ubuntu system?
No, the timezone setting is a system-wide setting that affects all users on the system. Individual users cannot have separate timezone settings.
6. What is the difference between UTC and GMT?
Coordinated Universal Time (UTC) and Greenwich Mean Time (GMT) are often used interchangeably as they share the same current time in practice. However, UTC is a time standard that is not affected by daylight saving time, while GMT is a timezone.
7. How do I revert to the default timezone settings after making a change?
To revert to the default timezone, you need to know what the default was (typically UTC or the timezone set during installation). Use the timedatectl set-timezone command followed by the default timezone, e.g., UTC or your region’s timezone.