Before setting TZ on a server, use tzselect to find the exact IANA identifier, such as Europe/London, without touching the machine's actual timezone. The interactive check takes about two minutes. You need a shell and readable timezone data; you do not need root privileges.
tzselect is a viewer and selector. It reads timezone data from /usr/share/zoneinfo/, asks questions in the terminal, and prints the selected TZ value. It does not set the system clock, change /etc/localtime, alter a service, or make the selection permanent.
That boundary makes it safe to explore. If you need to configure the host, stop after this guide and use your distribution's timezone configuration workflow: on Debian and Ubuntu, the installed manual page specifically points to dpkg-reconfigure tzdata. That is a separate operation and may affect applications that read the system timezone.
This guide was checked against Ubuntu's libc-bin package version 2.39-0ubuntu8.9. The command reports itself as GLIBC timezone data version 2.39. Check your own installation before relying on an example, because the available location names come from local data.
dpkg-query -W -f='${Package} ${Version}\n'
tzselect --version
Expected output on the checked machine is similar to this:
libc-bin 2.39-0ubuntu8.9
tzselect (Ubuntu GLIBC 2.39-0ubuntu8.9) 2.39
If dpkg-query is unavailable, run tzselect --version on its own. The version check is informational, not a requirement for starting the selector.
Run it with no positional argument. Prompts are written to the terminal, and your answers are read interactively:
tzselect
The first menu contains broad areas such as Africa, Americas, Asia and Europe. Enter the number beside the area, then press Enter. Selecting Europe, for example, produces a country menu; select a country, then a city or representative location when another menu appears.
Tip: pressing Enter without a number reprints the current menu. That is useful if output has scrolled away, but it is also an easy way to think you are stuck. An invalid entry reprints the list too. Correct the input rather than adding shell syntax to the prompt, this is a menu, not a command line.
After the location choice, tzselect prints a proposed value and shows the selected local time alongside Universal Time. A normal result looks like this, with the date and clock values varying at runtime:
Therefore TZ='Europe/London' will be used.
Selected time is now: Sun Sep 27 14:26:50 BST 2026.
Universal Time is now: Sun Sep 27 13:26:50 UTC 2026.
Is the above information OK?
1) Yes
2) No
Checkpoint: check the printed TZ name, not just the city label. A country can contain more than one civil-time region, and location labels guide selection rather than replace the timezone identifier. Compare the selected time with UTC to catch a wrong region or a daylight-saving expectation that does not match your target date.
At the final confirmation, choose Yes if the identifier is the one you need. Choosing No returns you to the selection flow, and Ctrl-C abandons the run at any point without changing anything on the host.
The conversation is interactive, so do not redirect all output and expect a clean value. The script writes its final TZ assignment to standard output while its questions are displayed on standard error. The simplest reliable method is to complete the prompts normally and copy the quoted identifier from the final result.
Use that identifier as an input to a later command only after checking it. For example, this reads the time in London without changing the machine timezone:
TZ='Europe/London' date
This temporary environment assignment applies to that one date process. It does not edit a configuration file and disappears when the command finishes. Replace the example with the exact TZ value printed by your own selection.
This installed version also supports --help, --version, and coordinate-driven selection, which avoids browsing continent and country menus:
tzselect -c +4852+00220
The example uses ISO 6709-style degrees and minutes for a point near Paris. The script then offers nearby timezone locations. With -n, limit how many nearby locations it displays:
tzselect -c +4852+00220 -n 5
Only use coordinate input when you understand its sign convention: a leading plus or minus identifies north or south latitude and east or west longitude in the compact form. If that feels less clear than the menus, use ordinary interactive selection instead.
TZ identifier./usr/share/zoneinfo/ data: location tables can differ between package versions.Ctrl-C. There is no state to undo because tzselect is read-only.tzselect version.TZ identifier.