You are here

Set the timezone of a Debian/Ubuntu server from the command-line

Submitted by Druss on Mon, 2014-08-25 19:34

Setting the timezone of an Ubuntu (14.04, Trusty) or Debian (7, Wheezy) server from the command-line is simple. Just run dpkg-reconfigure tzdata and follow the on-screen prompts. However, if you are running an unattended installation, you might want to avoid interactive prompts and just gets the job done. To do this, simply run

$ sudo ln -sf /usr/share/zoneinfo/America/Anchorage /etc/localtime

Browse through /usr/share/zoneinfo/ to locate your timezone.