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:
Shell
The output will have your timezone in it. For example, the output of that command on one of my boxes looks like:
Shell
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:
Shell
That’ll give you the timezone and even tell you the adjustment from GMT. If you want, you can use grep with it.
Shell
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:
Shell
The output from that would look a little like this:
Shell
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.