Posted: . At: 3:05 PM. This was 3 months ago. Post ID: 19176
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


How to set the timezone on Ubuntu with the command-line.


Setting the timezone on Ubuntu is very useful if you are dual-booting on a machine with Windows. This is an easy task, having the timezone set to UTC can cause problems.

Check the current timezone with this command.

┏jcartwright@jcartwright-System-Version╼╸╸╸╸╸╸╾
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━◉:~$ timedatectl status
               Local time: Sun 2024-02-04 14:41:33 AEDT
           Universal time: Sun 2024-02-04 03:41:33 UTC
                 RTC time: Sun 2024-02-04 03:41:33
                Time zone: Australia/Sydney (AEDT, +1100)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

Get a listing of all time zones with this command.

┏jcartwright@jcartwright-System-Version╼╸╸╸╸╸╸╾
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━◉:~$ sudo timedatectl list-timezones
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre
Africa/Brazzaville
Africa/Bujumbura
Africa/Cairo
Africa/Casablanca
Africa/Ceuta
Africa/Conakry
Africa/Dakar
Africa/Dar_es_Salaam
Africa/Djibouti
Africa/Douala
Africa/El_Aaiun
Africa/Freetown
Africa/Gaborone
Africa/Harare
Africa/Johannesburg
Africa/Juba
Africa/Kampala
Africa/Khartoum
Africa/Kigali
Africa/Kinshasa
Africa/Lagos
Africa/Libreville
Africa/Lome
Africa/Luanda
Africa/Lubumbashi

Then, once you have selected a time zone, use this command to set the new time zone.

┏jcartwright@jcartwright-System-Version╼╸╸╸╸╸╸╾
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━◉:~$ sudo timedatectl set-timezone Australia/Sydney

This is very easy to do, but very helpful.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.