This guide shows you how to set or change the system timezone on Ubuntu Linux. You’ll learn to check the current timezone, list available zones, and switch to a new one using both the command line and the graphical interface. No special tools are required—everything you need is built into a standard Ubuntu installation.
What You’ll Need
- A Ubuntu system (desktop or server) where you have sudo or root access
- Terminal access (Ctrl+Alt+T on desktop, or SSH for servers)
- An internet connection is only needed if you want to use NTP time synchronization; changing the timezone itself works offline
Step-by-Step
Method 1: Using timedatectl (Recommended)
- Open a terminal. Press
Ctrl+Alt+Ton the desktop, or connect via SSH to a server. - Check your current timezone. Run
timedatectl(ortimedatectl status). The output shows the local time, universal time, and the current timezone, for exampleAmerica/New_York. - List available timezones. Run
timedatectl list-timezones. This prints a long list of valid zone names likeEurope/LondonorAsia/Tokyo. To filter, pipe to grep:timedatectl list-timezones | grep Europe. - Set the new timezone. Run
sudo timedatectl set-timezone Your/Zone, replacingYour/Zonewith the exact name from the list. For example:sudo timedatectl set-timezone Europe/Berlin. - Verify the change. Run
timedatectlagain. The “Time zone” line should now show the new zone, and the local time should reflect it.
Method 2: Using the /etc/localtime Symlink (Legacy)
- Open a terminal.
- Back up the current setting (optional but safe):
sudo cp /etc/localtime /etc/localtime.bak - Remove the existing symlink. Run
sudo rm /etc/localtime. - Create a new symlink to the desired zone file in
/usr/share/zoneinfo/. For example, for Berlin:sudo ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime. - Verify. Run
dateto see the new time. This method is older and can confuse some tools, so prefertimedatectlwhen possible.
Method 3: Using the Graphical Interface (Desktop Only)
- Open Settings. Click the system menu (top-right corner) and select the gear icon, or search “Settings” in the activities overview.
- Go to Date & Time. In the left sidebar, click Date & Time.
- Turn off Automatic Time Zone if it is on (toggle it off). This is needed if you want to pick manually.
- Click the timezone field. A map appears. Type your city in the search box or click on the map. The system updates the timezone instantly.
- Close Settings. The change is saved automatically.
Common Mistakes
- Typing the zone name wrong. Timezones are case-sensitive and use forward slashes.
europe/berlinfails;Europe/Berlinworks. - Using abbreviations. Setting
ESTorPSTdoes not work withtimedatectl. You must use the full IANA name likeAmerica/New_York. - Forgetting sudo. Changing the timezone requires root privileges. Without
sudo, you get a “Failed to set time zone” error. - Editing /etc/timezone directly. On modern Ubuntu, this file is managed by
timedatectl. Manually editing it may be overwritten or ignored. - Assuming UTC is wrong. Servers often intentionally run on UTC. Changing it to local time can break log correlation or cron schedules. Only change if you have a reason.
Tips
- Use tab completion. When typing the zone name in the terminal, press
Tabaftersudo timedatectl set-timezoneto auto-complete the region and city. - Set the timezone during installation. If you are installing a new system, you can avoid this step by choosing the correct region during setup.
- Keep NTP enabled. After changing the timezone, ensure
timedatectlshowsNTP service: active. This keeps the clock accurate over the internet. - Check with multiple commands. Use
date,timedatectl, andcat /etc/timezoneto confirm the change from different angles. - For containers and WSL. In Docker containers or Windows Subsystem for Linux,
timedatectlmay not work. Use the symlink method or set theTZenvironment variable instead.
Troubleshooting
- “Failed to set time zone: Unit systemd-timedated.service not found.” This happens on minimal systems or containers. Install the required package with
sudo apt install systemd-timesyncd, or fall back to the symlink method. - Time is still wrong after changing the zone. Check if NTP is overriding your manual setting. Run
timedatectland look at “NTP service”. If it says “active”, runsudo timedatectl set-ntp false, set the timezone, then re-enable NTP withsudo timedatectl set-ntp true. - The timezone list is empty or missing entries. The
tzdatapackage may be incomplete. Runsudo apt update && sudo apt install --reinstall tzdata. - Applications still show old time. Some long-running processes cache the timezone. Restart the application or the session (log out and back in) to force a reload.
- Hardware clock is off. If the BIOS clock is set to local time instead of UTC, you may see a discrepancy. Run
sudo timedatectl set-local-rtc 0to tell Ubuntu to treat the hardware clock as UTC (recommended).
Frequently Asked Questions
What is the difference between UTC and GMT?
UTC (Coordinated Universal Time) is the atomic time standard used as the basis for civil time. GMT (Greenwich Mean Time) is a time zone that historically matched UTC. For practical purposes in Ubuntu, they are identical, and the correct zone name is Etc/UTC or Europe/London (which observes daylight saving).
How do I set the timezone without sudo?
You cannot change the system timezone without root privileges. However, you can set the TZ environment variable for your current shell session: export TZ=Asia/Tokyo. This affects only that terminal window and its child processes.
Does changing the timezone affect cron jobs?
Yes. Cron uses the system timezone. After changing it, scheduled jobs will run at the new local time. Check your /etc/crontab and user crontabs to see if any jobs need adjusting.
How do I find my current timezone in a script?
Use cat /etc/timezone (prints just the zone name) or timedatectl show -p Timezone --value (prints the value without extra text). Both work well for scripting.
Is it safe to delete /etc/localtime?
Yes, but only if you immediately replace it with a symlink to a valid zone file. If you leave it missing, many programs will fall back to UTC, and some may error. The timedatectl method handles this automatically.
Why does my Ubuntu server default to UTC?
UTC is the standard for servers because it avoids daylight saving ambiguity and makes logs from multiple machines comparable. It is a deliberate default, not an error. If you need local time for user-facing services, change it as described above.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Custom Alphanumeric Passcode iPhone: How to Set
- HomePod Software Update: How to Install
- How to Shuffle Photos in Slideshow on iPhone
- Quick Look Not Working on Mac? Fixes That Work
- How to See Deleted WhatsApp Messages on iPhone
- QUIC Protocol Error in Windows 10: Fixes