# Changing the time zone in the Linux shell

> Set a different time zone for your Linux shell session with the TZ environment variable to change file times and date output.

Source: https://helpcenter.ruachost.com/developers/linux/changing-the-time-zone-in-the-linux-shell/

By default, a Linux shell uses the host server's time zone. If you are in a different time zone, you can override this setting with `TZ`.

> **Note:**
Ruachost servers run on UTC (GMT+0). Times in your shell, file listings and logs are shown in UTC unless you change `TZ`.

The `TZ` environment variable affects file and directory timestamps as well as the output of the `date` command. For example, to set the time zone to Lagos, Nigeria:

```bash
export TZ="Africa/Lagos"
```

To make this change permanent for future logins, add the line above to your `~/.bash_profile` or `~/.bashrc` file.

> **Tip:**
To see all available time zones on the server, use the `tzselect` program. It lets you choose a time zone based on your region and country, and then you can set the corresponding `TZ` value in your shell profile file.

For a complete list of time zones, visit:\
[Wikipedia: List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)
