How To

How to Change Ubuntu Timezone Using Terminal or GUI

Keeping the correct system clock is important for servers, desktop systems, scheduled tasks, and application logs. If you need to Change Ubuntu Timezone, Ubuntu provides both command-line and graphical methods that make the process quick and simple.

Whether you manage a cloud server or a personal Linux desktop, adjusting the timezone ensures accurate timestamps, cron jobs, and synchronized services.

Why You May Need to Change Ubuntu Timezone

Ubuntu automatically sets the timezone during installation. However, users often need to update it later when moving servers between regions, deploying cloud instances, or configuring remote systems.

An incorrect timezone can create issues with:

  • Scheduled cron tasks
  • Server logs
  • Database timestamps
  • Application monitoring
  • Automated backups

Thankfully, Ubuntu includes built-in tools that allow you to modify timezone settings without rebooting the machine.

Change Ubuntu Timezone Using timedatectl

The easiest and most reliable method is the timedatectl command. It works on all modern Ubuntu releases that use systemd.

First, check the current timezone:

timedatectl

Ubuntu will display details such as local time, UTC time, and the active timezone.

Next, list all available timezones:

timedatectl list-timezones

You can scroll through the list or search for a specific region. Once you identify the correct timezone, apply it using:

sudo timedatectl set-timezone America/New_York

Replace the example timezone with your preferred region and city.

After making the change, verify the configuration again:

timedatectl

This method updates the system timezone instantly without requiring a reboot.

Change Ubuntu Timezone Through GUI

Desktop users can also Change Ubuntu Timezone using the GNOME Settings interface.

Open the system settings menu and navigate to:

System → Date & Time

From there, disable automatic timezone detection if it is enabled. You can then manually search for your city or region and apply the new timezone.

The graphical method is especially useful for users unfamiliar with terminal commands.

Troubleshooting Timezone Issues

Sometimes timezone changes may not work as expected. Here are a few common fixes.

Invalid Timezone Error

Timezone names are case-sensitive. Always use the exact format shown by:

timedatectl list-timezones

Logs Still Show Old Timezone

Certain services continue using the previous timezone until restarted. Restart the affected application or reboot the service manually.

Automatic Timezone Not Updating

Ensure the system has internet access and location services enabled if using automatic detection on Ubuntu Desktop.

Conclusion

If you need to Change Ubuntu Timezone, Ubuntu offers both terminal and graphical solutions that are fast and reliable. The timedatectl command remains the preferred option for servers and remote systems because it works instantly and requires minimal effort.

For desktop users, the built-in Date & Time settings provide an easier visual approach. Regardless of the method you choose, keeping the correct timezone helps maintain accurate logs, task scheduling, and overall system stability.

Cyber Defence

Recent Posts

Bash Scripting Best Practices Every Beginner Should Know

Introduction Bash scripting is a powerful way to automate Linux tasks, but writing a script…

8 hours ago

How To Create A Self-Signed SSL Certificate Using Bash And OpenSSL

Introduction A self-signed SSL certificate is a certificate that is created and signed by the…

9 hours ago

How To Debug Bash Scripts Using bash -x And set Commands

Introduction Debugging is an important part of Bash scripting. When a script does not work…

14 hours ago

How To Use Cron Jobs With Bash Scripts For Automation

Introduction Cron jobs are used in Linux to run commands or Bash scripts automatically at…

15 hours ago

How To Use Pipes In Bash Scripts For Command Chaining

Introduction Pipes are an important feature in Linux and Bash scripting. A pipe allows you…

16 hours ago

How To Use grep, awk, And sed In Bash Scripts

Introduction The grep, awk, and sed commands are powerful text-processing tools in Linux. They are…

17 hours ago