Command Line

How To: Find Your Timezone In The Terminal

This article is about your system time, specifically how to find your timezone in the terminal. It shouldn’t be a very long article and it should be relatively easy and suitable for new Linux users.

Why would you want to find your timezone in the terminal? Well, for starters you may not have the proper time set and need to verify it. You may also be working with servers scattered across the globe and knowing the timezone may be important.

As you may need things synchronized, knowing the timezone could be important. Seeing as you’re not always able to access a GUI desktop, you might want to find your timezone in the terminal. So, to those end, this article will share a few ways to do so.

Find Your Timezone In The Terminal:

Obviously, this article requires an open terminal. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open. If you’re operating remotely, you probably already have a terminal open.

Anyhow, there are multiple ways to do this. For starters, you can just use the date command. It looks like this:

date

The output will have your timezone in it. For example, the output of that command on one of my boxes looks like:

$ date
Fri 08 Oct 2021 08:17:53 PM EDT

As you can see, the timezone is at the end. In my case, it’s “EDT” and that’s probably the easiest way to get the timezone information.

You can also use ‘timedatectl’ which looks like this:

timedatectl

That’ll give you the timezone and even tell you the adjustment from GMT. If you want, you can use grep with it.

timedatectl | grep "Time zone"

That will, of course, just output the line containing your timezone. Also, I have no idea why it’s two words. I know it as one word, but here we are and I suppose it’s just not that important.

I have one more way to find your timezone in the terminal and it’ll output your timezone in text. It’s just:

cat /etc/timezone

The output from that would look a little like this:

$ cat /etc/timezone
America/New_York

So, there are a few ways. There are surely other ways, so feel free to leave a comment sharing them.

Closure:

And there you have it, another article. This one shares how to find your timezone in the terminal. It’s a relatively easy article to follow and not really a tool I expect most users to need. Still, it’s there if you need it and this article stands as a reference to it.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

View Comments

Recent Posts

How To: Install Wine In Lubuntu

Today's article isn't going to be complicated or long as we are going to cover…

1 day ago

Update Python Packages (PIP)

We've had a run of Python packages recently and you can tell that I'm a…

3 days ago

Save A Command’s Output To A File (While Showing It In The Terminal)

The title is the best I can come up with to describe this exercise as…

5 days ago

Demystifying journalctl: A Comprehensive Guide to Linux System Logging

It was suggested that I write an article about journalctl, which seemed like a large…

1 week ago

Extract Text From Multiple File Types

Today we will have a fairly simple exercise as we're going to just use a…

1 week ago

Meta: I’ve Been At This For Three Years!

I have not done a meta article lately. I don't find them interesting to write…

2 weeks ago