Filters
Zo zoek je
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • "twee woorden" vindt precies die zin.
  • --naam of -x vindt een optie.
  • #woord zoekt alleen in commando's.
  • @grep vindt lessen en labs die grep gebruiken.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Zet ! voor een woord om het weg te laten. OR tussen woorden betekent één ervan.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken

tzselect

Find the name of a time zone by answering questions (it does not change the system).

Niveau
Dagelijks Linux
Groep
Tijd
Root nodig
Nee
Pakket
glibc-common

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

Wat het doet

tzselect asks for the continent, country and region and prints the zone name (like Asia/Riyadh) plus a TZ line you can use. Then set it with timedatectl set-timezone NAME.

Zo schrijf je het

tzselect [-c COORD] [-n LIMIT]

Opties 4

Meest gebruikt

-c COORD
Start from coordinates like +2430+04643 (Riyadh).
-n LIMIT
With -c: show this many closest zones.
--help
Show help.
--version
Show the version.

Voorbeelden 10

$ als gewone gebruiker# als root (of met sudo)

  1. 1Find a zone interactively

    tzselect

    Choose continent, country, region; it prints the name.

  2. 2Then set it

    timedatectl set-timezone Asia/Riyadh

    tzselect only shows the name.

  3. 3By coordinates

    tzselect -c +2430+04643 -n 3

    The 3 zones closest to Riyadh.

  4. 4Alternative: list and grep

    timedatectl list-timezones | grep -i cairo
    Africa/Cairo

    Faster when you know the city.

  5. 5Test a zone first

    TZ='Africa/Cairo' date

    Shows the local time there.

  6. 6Use in a user profile

    echo "TZ='Europe/Amsterdam'; export TZ" >> ~/.bash_profile

    Only this user sees that zone.

  7. 7Zone files

    ls /usr/share/zoneinfo/Asia | head

    Every zone is a file.

  8. 8Current zone

    timedatectl show -p Timezone --value

    The system zone.

  9. 9Check daylight saving changes

    zdump -v Europe/Amsterdam | grep 2026

    When the clock changes.

  10. 10In containers

    podman run --rm -e TZ=Asia/Riyadh registry.access.redhat.com/ubi10/ubi date

    Set the zone for one container.

Exitcodes

0Done.
1Error.

Volledige handleiding

Deze pagina legt het commando uit in eenvoudige woorden. De originele handleiding heeft elk detail.

In je terminal: man 8 tzselect