This post is about permanently changing the timezone an a Linux machine via the file system representation of the timezone.
On most Linux machines the timezone is configured with the file /etc/localtime
. This file most often is a link to a timezone settings file, e.g. inside /usr/share/zoneinfo/
. As a consequence, the local timezone can easily be changed by pointing /etc/localtime
the target timezone file. Changes to it will be effective immediately (it depends on programs when they pick up that change).
Example of updating the timezone:
# remove the existing old timezone link
sudo rm /etc/localtime
# let the new timezone link point to the target timezone (Vienna/Austria in this example):
sudo ln -s /usr/share/zoneinfo/Europe/Vienna /etc/localtime