Hello, friends. In this post, simple and for beginners, you will learn how to change the timezone in Ubuntu 22.04 | Linux Mint 21
The timezone is one of the issues that during the installation of an operating system is configured to improve the integration of the whole system. However, for any reason, we can change it to adjust it to a new location.
Think of it is that you move and need to change it manually or because you need to know it for configuration scripts. In any case, it is important to know this entire process.
Let’s start
Change the timezone on Ubuntu 22.04 | Linux Mint 21
The first thing we have to do is to verify which timezone is on the system. To achieve this, open a terminal and run the following command.
timedatectl
You will get an output screen like this
Local time: Mon 2022-09-26 18:15:34 EDT
Universal time: Mon 2022-09-26 22:15:34 UTC
RTC time: Mon 2022-09-26 22:15:34
Time zone: America/Montreal (EDT, -0400)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
An essential thing to note is that the timezone is also written in the file /etc/timezone
.
cat /etc/timezone
Output
America/Montreal
The next step is to change it, but first it is convenient to check all the available timezones.
To achieve this, just choose this command
timedatectl list-timezones
You will get a fairly large sample output with all available timezones.
Sample Output
.
.
.
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre
Africa/Brazzaville
Africa/Bujumbura
Africa/Cairo
.
.
.
It is a good idea to combine the above command with the use of grep to improve the data. For example
timedatectl list-timezones | grep "America"
There you will only show the timezones for America.
Finally, you can define the new timezone with the following syntax
timedatectl set-timezone [your-timezone]
For example,
timedatectl set-timezone America/Chicago
Finally, you can check the changes made
timedatectl
As you can see, it is a simple process, but it can help us in more than one occasion. On the other hand, it is also especially useful in advanced configuration scripts.