How to change timezone in Ubuntu

By default, when you purchase a dedicated server or vps, the timezone of the OS is set to the origin country. We will go through different methods on how to change timezone in Ubuntu.

Note: This article is for Ubuntu server.

Terminal GUI

The easiest way to set and change timezone in Ubuntu is to use dpkg-reconfigure in terminal.

sudo dpkg-reconfigure tzdata
timezones

Choose your desired timezone from the listed zones while navigating with keyboard keys.

Terminal

If you like to do it through commands, for that you can 1st list all the time zones available.

timedatectl list-timezones

To change to your timezone, run the following command.

sudo timedatectl set-timezone America/Antigua

This is useful if you have a script to change or set timezone.