How To Change The Time Zone In Debian And Ubuntu

After the initial installation of your operating system, you may later want to change the time zone and time. For example, I recently moved far away from my previous home, so I needed to change the time zone.

In Debian or newer versions of Ubuntu, it is not immediately obvious how to change the time or the time zone. But, nevertheless, there is a fairly easy way to change the time zone in both Debian and Ubuntu. This article discusses how to change the time zone in Debian and Ubuntu.

Steps For Changing The Time Zone In Debian and Ubuntu

Step 1: Open A Terminal And Type In A Command

The first thing you must do is to open up a terminal type in this following command:

sudo dpkg-reconfigure tzdata

(Note: dpkg is the package manager for Debian and Ubuntu, and using dpkg-reconfigure allows you to reconfigure a previously installed package. tzdata stands for time zone data)

Step 2: Choose Your Geographic Area

After you type the command, you will be greeted with a prompt asking you to choose your geographic area which most likely is the continent that you are living on. It will look something like the screenshot below.

Change time zone in Debian and Ubuntu 1

Use the left and right arrows to switch between <Ok> and <Cancel>, and use the up and down arrows to go through the geographic list.

After you have found your geographic region, then hit the right arrow key, choose <Ok> and then the enter key.

Step 3: Choose A Major City Or Region Corresponding To Your Time Zone

After you have chosen your geographic area, you will then see a screen with many city names and some regions. Pick any of the major cities that correspond to your time zone. Like step 2, use the up and down arrows to scroll through the list, and once you have chosen a city corresponding to your time zone, hit the right arrow key, choose <Ok>, and then the enter key. It should look like the screenshot below.

Change time zone in Debian and Ubuntu 2

Step 4: Wait A Few Seconds For Your System To Update The Time

After finishing step 3, you should get some output like:

Current default time zone: 'Asia/Hong_Kong'
Local time is now:      Mon Oct 30 18:33:50 HKT 2017.
Universal Time is now:  Mon Oct 30 10:33:50 UTC 2017.

Then, after finishing step 3, you may have to wait a few seconds for your system to update the time. In my experience, Debian and Ubuntu usually update the time zone and time within just a few seconds, or it could even be  updated immediately.

What did you think of this article? Do you have anything to add? Let’s discuss it in the comments below.

Leave a Reply

Your email address will not be published. Required fields are marked *