How to get the timezone in Ubuntu Linux?

If you are using a GNU/Linux distribution based on Ubuntu the easiest way to get the timezone is by using following command:

timedatectl

The output should look similar to this:

      Local time: Tue 2018-07-24 11:27:00 CDT
  Universal time: Tue 2018-07-24 16:27:00 UTC
        RTC time: n/a
       Time zone: America/Mexico_City (CDT, -0500)
 Network time on: yes
NTP synchronized: yes
 RTC in local TZ: no

As you can see, this server is on the America/Mexico_City timezone.

That’s it, see you next time!

Alex Arriaga

Leave a Reply

Your email address will not be published. Required fields are marked *