Skip to content

How to change Timezone in Linux with timedatectl

homepage-banner

Introduction

The timezone is an important aspect of any system, as it allows you to accurately record the time and date of events. In Linux, you can change the timezone using the timedatectl command. This command allows you to set the system’s timezone, as well as view the current timezone and other time-related information. In this blog post, we will discuss how to change the timezone in Linux using the timedatectl command.

Check timezone

timedatectl
timedatectl status
timedatectl list-timezones

Change timezone

sudo timedatectl set-timezone <your_time_zone>
sudo timedatectl set-timezone UTC
timedatectl

Set ntp Service

timedatectl set-ntp true

Other timedatectl Commands

In addition to setting and viewing the timezone, the timedatectl command can be used for other time-related tasks. Some of the other commands that can be used with timedatectl include:

  • timedatectl status: Displays the current time, date, and timezone information.
  • timedatectl set-time {time}: Sets the system time to the specified time.
  • timedatectl set-ntp {true/false}: Enables or disables NTP (Network Time Protocol) synchronization.

Conclusion

In conclusion, changing the timezone in Linux is a straightforward process. You can use the timedatectl command, modify the /etc/localtime file, or use the graphical interface, depending on your preference. It is essential to set the correct timezone on your system to ensure accurate time synchronization and avoid confusion when working with international clients or colleagues. We hope this article has been helpful in guiding you through the process of changing the timezone in Linux.

Leave a message