How to change timezone in Ubuntu / Debian from command-line

This guide assumes that you use Ubuntu or Debian-based GNU/Linux distro. There are two ways to change timezone from bash command line.

sudo dpkg-reconfigure tzdata

or,

sudo ln -sf /usr/share/zoneinfo/Asia/Kuala_Lumpur /etc/localtime

You can also specify other timezone in the second method, for example:

sudo ln -sf /usr/share/zoneinfo/GMT /etc/localtime

or for Eastern Standard Time (US)

sudo ln -sf /usr/share/zoneinfo/EST /etc/localtime

This command is handy when administrating multiple servers across different continents.