Change the Time Zone ubuntu

Open the Terminal and enter the following command in order to list all the timezones of the specified zone:

Syntax:

$ timedatectl list-timezones | grep -i [zone]

Example:

We will use this command to list all the time zones of Europe:

$ timedatectl list-timezones | grep -i europe
Get a list of available time zones

In this example, we will be setting the time zone to Europe/Istanbul. First, let us unlink the system time with local time through the following command:

$ sudo unlink /etc/localtime

The next step is to use the following command to set a new time zone:

Syntax:

sudo ln -s /usr/share/zoneinfo/[Zone/TimeZone] /etc/localtime

Example:

sudo ln -s /usr/share/zoneinfo/Europe/Istanbul /etc/localtime

You can then verify the changed settings through one of the following commands:

Verify timezone change
$ timedatectl

or

$ ls -l /etc/localtime

About Damon Luong

San Jose, California
This entry was posted in command line of linux, My Linux, ubuntu. Bookmark the permalink.