Most users aren’t familiar with how to change the time zone on the Linux system. When a new Linux distribution installs on the system, it automatically sets the system time zone during the installation. However, if you need to change the system local time due to any reason, then you can easily do it.
We will show in this tutorial how to set the time zone of your system in Debian 11 bullseye distribution using different methods.
The Debian 11 bullseye distribution allows you to set your system time zone using the following two different methods:
- Set time zone using the graphical environment
- Set time zone using command line or terminal
Method 1: Set Time Zone using GUI
You need to access the system Time Zone setting to change the time zone in Debian 11 distribution. To access the time zone setting in the Debian 11 system, click on the ‘Activities’. Now, type the ‘date & time’ in the search bar.
Click on the displaying ‘date & time’ settings. The following window appears on the desktop:
In the above screenshot, you can easily locate the ‘Time Zone’ option.
Click on the time zone and the following window displays on the desktop:
Now, in the search bar, search for a particular state or location and press ‘Enter’. It will automatically set your Debian 11 system time zone according to the desired search location.
Method 2: Set Time Zone using command line or terminal
An alternative method using terminal or command-line is also available to set the time zone of Debian 11 distribution. Open the Terminal application from the application menu.
Use timedatectl utility to display the Current Time Zone
The ‘timedatectl’ utility helps you to display the current time zone information of your system. Almost in all modern Linux distributions, the timedatectl utility is available by default. Display the current time zone information by using the following command:
$ timedatectl
You can find your time zone configuration by using the following symlink path those points to a particular directory:
$ ls -l /etc/localtime
Set time zone in Debian 11 bullseye
To set the time zone in Debian 11, display the list of the time zone of all countries.
$ timedatectl list-timezones
The time zone list of all world displays on the terminal.
To set a new time zone, unlink the previous local system time by using the following command:
$ sudo unlink /etc/localtime
Now, using the following command set the new time zone for your Debian 11 system:
$ sudo timedatectl set-timezone Asia/Karachi
Create the symlink of the local time zone by using the below-mentioned command:
$ sudo ln -s /usr/share/zoneinfo/Asia/Karachi /etc/localtime
If you will see your system time zone, it has been set to Asia/Karachi.
Conclusion
We learned how to set the time zone in Debian 11 bullseye distribution. Both methods are provided in this article set time zone using GUI as well as using terminal via timedatectl utility. Changing the time zone is such a simple and easy method. We suggest you try the above method on your Linux system. Thanks!