Connect with us

    Hi, what are you looking for?

    Devs

    How to Change the Time Zone on Ubuntu via Terminal

    Ubuntu, like other Linux distributions, allows you to change the time zone settings easily via the terminal. This is useful for users who want to set their system’s time zone to match their location, especially after installing a fresh version of Ubuntu, or when a system needs to be used in a different region.

    Ubuntu

    Ubuntu, like other Linux distributions, allows you to change the time zone settings easily via the terminal. This is useful for users who want to set their system’s time zone to match their location, especially after installing a fresh version of Ubuntu, or when a system needs to be used in a different region.

    Changing the time zone on Ubuntu involves modifying system settings, and you can do it using command-line tools. In this guide, we’ll walk you through the process of changing the time zone on Ubuntu using the terminal.


    Step-by-Step Guide to Change the Time Zone on Ubuntu

    1. Check the Current Time Zone

    Before changing the time zone, it’s useful to know the current setting. You can check the current time zone by using the timedatectl command, which is available on modern versions of Ubuntu.

    timedatectl
    

    This will show you the current time, time zone, and other related information. Look for the line that says Time zone.

    2. List Available Time Zones

    To change the time zone, you need to know the correct identifier for the time zone you want to set. Ubuntu uses a set of predefined time zone names, typically based on the format Region/City (e.g., America/New_York, Europe/London).

    To list all available time zones, run the following command:


    timedatectl list-timezones
    

    This will display a long list of all time zones supported by your system. You can scroll through the list or use the grep command to filter for specific regions or cities. For example, to find time zones in the Europe region:

    timedatectl list-timezones | grep Europe
    

    This will show all time zones in the Europe region, such as Europe/London, Europe/Paris, and others.

    3. Set the New Time Zone

    Once you’ve found the correct time zone for your location, you can set it using the timedatectl command. For example, if you want to set the time zone to America/New_York, you would use the following command:

    sudo timedatectl set-timezone America/New_York
    

    This command updates the system’s time zone. Replace America/New_York with the appropriate time zone string for your location.

    4. Verify the Time Zone Change

    After setting the new time zone, you can verify the change by running the timedatectl command again:


    timedatectl
    

    This should display the new time zone under the Time zone line.

    You can also check the system’s time by running the following:

    date
    

    This will show you the current date and time, adjusted to the new time zone.

    5. (Optional) Restart the System

    In most cases, the time zone will change immediately, and no restart is required. However, if you encounter any issues or if you want to ensure that everything is updated properly, you can restart your system:


    sudo reboot
    

    After the system restarts, the new time zone should be active.

    Alternative Method: Changing the Time Zone Using /etc/timezone

    If for some reason the timedatectl method does not work or you prefer an alternative approach, you can also change the time zone by directly editing the /etc/timezone file.

    1. Edit the /etc/timezone file:

      Open the file in a text editor, such as nano:

      sudo nano /etc/timezone
      
    2. Update the Time Zone:

      Replace the current value with the time zone you want to use. For example, change it to America/New_York:

      America/New_York
      
    3. Apply the Time Zone:

      After saving the file, run the following command to reconfigure the time zone:

      sudo dpkg-reconfigure -f noninteractive tzdata
      

      This will update the system’s time zone settings based on the value you set in /etc/timezone.

    4. Verify the Change:

      As before, use timedatectl to verify the change:

      timedatectl
      

    Changing the time zone on Ubuntu via the terminal is a simple process. Using timedatectl is the preferred and modern method, allowing you to view, change, and manage time zone settings easily. In addition, by editing /etc/timezone, you have an alternative approach, though the timedatectl method is more direct and less prone to errors.

    Once you’ve set your correct time zone, your system should automatically update the time based on your local time zone, which is particularly useful for system logs, cron jobs, and time-dependent applications. By keeping your time zone properly configured, you ensure that your system works smoothly, no matter where you are in the world.

    Photo by RealToughCandy.com

    Written By

    My name is Juan de Souza, a 26-year-old entrepreneur, investor, blogger, and streamer. My journey in business began at the age of 10, leveraging a dial-up internet connection in Brazil to start my first venture. Currently, I reside in Porto, Portugal, where I have been based since 2025.

    Comments
    Advertisement

    Join Our Discord Server

    Advertisement
    Advertisement

    Recommended Posts for You

    HeartstopperHeartstopper

    LGBTQIA+

    Check out the full review of Netflix's Heartstopper series and find out if the Heartstopper series delivers everything it promises in full!

    Cinema

    “One of the most memorable cartoons of the 20th and 21st centuries. Its story, characters and writing are utterly captivating. “Little Bear” is known...

    Curiosities

    Super Mario World, also known as “Super Mario Bros. 4” in Japan, is without a doubt one of the most popular games of all...

    Cinema

    “Courage the Cowardly Dog” tells the story of Courage, a dog who’s easily scared and lives on a farm with Muriel and Eustace Bagge...

    Cinema

    Who doesn’t know this epic cartoon from Hanna-Barbera, Wacky Races, where eleven competitors vied in every episode for the world title of “World’s Wackiest...

    Cinema

    Sagwa, one of the best cartoons still airing on the Futura channel. In fact, all the shows on Futura are excellent. It tells the...

    Cinema

    “Do you remember the classic cartoon Timon and Pumbaa? It’s an animated TV series produced by Walt Disney Animation, starring the warthog and meerkat...

    Cinema

    At the end of the 1930s, animation was at its peak. It was called the “Golden Age” by many film enthusiasts, where classic characters...

    Curiosities

    Grand Theft Auto V (GTA V) is known for its vast open-world gameplay, where players can explore, complete missions, or just cause chaos. One...

    Cinema

    Woody Woodpecker, one of the most beloved characters of all time. Adored by children, teenagers, and adults alike. The show itself dates back to...

    Others

    “Castelo Rá‑Tim‑Bum” premiered in 1994 on TV Cultura, delighting fans of the original “Rá‑Tim‑Bum” who were tired of its reruns, as well as other...

    Tech

    If you grew up playing console games in the 1980s and 90s and never heard this one, count yourself lucky—very lucky. Here’s the urban...

    DisneyDisney

    Cinema

    Walt Disney, one of the largest and most influential entertainment giants in the world, has a long history of innovation in animation. From its...

    Games

    “Nintendo 64” is Nintendo’s third home video game console. Commonly abbreviated as “N64,” it launched on June 23, 1996 (Japan) and on September 29 in the United States....

    Games

    How about transforming your Minecraft into an even more immersive game? With that in mind, the “Realistico” Mod Pack was developed—a texture pack with...

    Games

    It's time to talk about Far Cry 4: a new game in the iconic open-world franchise that first arrived over 10 years ago with paradisiacal...

    Should I Cover My Webcam with a Sticker?Should I Cover My Webcam with a Sticker?

    Tech

    We’ve all heard about the risks of being tracked online and how cybercriminals exploit vulnerabilities to access personal data. One particular topic that often...

    Games

    You’ve definitely seen, heard about, or played Just Dance at some point—it’s simply one of the most incredible games ever created and maintained by...

    Games

    Need For Speed Heat has finally hit the streets and is increasingly reminiscent of the franchise’s golden-era titles, such as Need For Speed Underground...

    Plants vs. Zombies Garden WarfarePlants vs. Zombies Garden Warfare

    Games

    Recently, Plants vs. Zombies Garden Warfare was released—it’s the new game from PopCap, famous for its mobile hits. This time, we have a review...