screenless) instances like servers.

Find out how to setup a timezone from the terminal, using .bashrc.

What Is.bashrc?

Four hard drivers sticking out of a rack-mount server that’s being used as a NAS.

The.bashrcfile is a hidden Bash-shell specific file sitting in the root of you home directory, i.e.

it’s location is~/.bashrc.

When using

, Bash will automatically replace the tilde with your home directory (i.e.

Tux mascot jumping from Windows to Linux.

including the user name).

you’re free to edit this file by using a text editor like

or

.

Simply execute

to get started with editing your.bashrc.

Article image

If you get an error that

was not found on your system, simply implement the same by using

.

The.bashrcfile contains per-user system configuration implementations.

Armed with this information, it will now be easy to update our.bashrcfile to match our desired setup.

Setting a timezone by exporting the TZ variable in Bash

you might also typetimedatectlwithout any options to see a fuller overview.

We also looked at how to edit this file and what the file does.

screenless) system, like is the case with servers.Enjoy the correct time, every time!

Article image

The informative output of timedatectl