SETUP-TIMEZONE(8)

πŸ“¦ version 3.22.0, in alpine 3.24

πŸ’… SETUP-TIMEZONE πŸ’…

okay so bestie, welcome to setup-timezone(8) β€” section 8 of the System Manager's Manual, aka the girlies who run your box. this little icon is literally gonna tell your whole system what time it is. let's get into it ✨


🌸 NAME 🌸

setup-timezone β€” set the system timezone. that's it, that's the tweet πŸŽ€


✨ SYNOPSIS ✨

setup-timezone [-h] [-k | -i] [TIMEZONE]

look at her. so clean. so simple. -k and -i are giving "pick me, choose me" energy because you literally cannot run both at once 😭


πŸ¦‹ DESCRIPTION πŸ¦‹

setup-timezone configures the system timezone, no cap. it installs tzdata, copies or symlinks the selected zoneinfo file, and creates the /etc/localtime symlink. the whole glow-up in one command πŸ’…

so here's the tea. run it with no options and tzdata gets installed as a temporary package and the zoneinfo gets copied into /etc/zoneinfo/. temp queen. here for a good time not a long time 🫢

but with -i? tzdata stays installed permanently and /etc/localtime gets symlinked to /usr/share/zoneinfo instead of copied. commitment!! we love a long-term relationship πŸ’–

TIMEZONE is a path relative to /usr/share/zoneinfo, like America/New_York or UTC. if you hand it over on the command line, it gets validated and configured β€” iconic, decisive, we stan. if you don't pass one... the script just exits without changes. no notes, no drama, no timezone set πŸ™ˆ

and if you omit TIMEZONE entirely, plot twist: the script interactively lists timezone areas and prompts you to navigate the timezone tree 🌳 like a lil choose-your-own-adventure but make it chronometric.


πŸ”₯ OPTIONS πŸ”₯

  • -h β€” display usage information and exit. the "wait what does this do again" button 🧚
  • -i β€” install the tzdata package permanently and symlink /etc/localtime to /usr/share/zoneinfo/TIMEZONE instead of copying. full send, permanent residency ✨
  • -k β€” keep existing zoneinfo files in /etc/zoneinfo/ when copying. without this option, /etc/zoneinfo/ is removed before the new file is copied. so like... -k is the "don't clear my cache" flag 😭 use it or lose it bestie
ngl, remember: -k and -i are mutually exclusive β€” the synopsis literally shows [-k | -i] with the pipe. it's one or the other, pick your fighter πŸ’€

🧚 INTERACTIVE MODE 🧚

no TIMEZONE argument? okay diva, let's go on a journey 🌈 the script lists available top-level timezone areas (e.g. America, Europe) and prompts:

Which timezone are you in? (or '?' or 'none')

you can type in an area name to drill down into its sub-timezones, hit ? to redisplay the list, or none / abort to exit. respect the escape hatch 🫢

and when you select a directory, it shows its sub-timezones with the prompt:

What sub-timezone of 'AREA' are you in? (or '?')

this continues until a timezone file is selected. drill down, drill down, drill down β€” it's giving lore deep-dive and honestly? obsessed πŸ’œ


πŸŽ€ FILES πŸŽ€

  • /usr/share/zoneinfo/ β€” IANA timezone database directory. the mothership πŸ‘‘
  • /etc/localtime β€” symlink to the configured timezone. the main character 🌟
  • /etc/zoneinfo/ β€” local copy of the zoneinfo file when tzdata is not permanently installed. the backup bestie πŸ’–

πŸ’€ EXIT STATUS πŸ’€

  • 0 β€” success. we ate and left no crumbs πŸ“
  • non-zero β€” an error occurred (invalid timezone, install failure). it's giving flop, but like, informative flop 😭

🌟 SEE ALSO 🌟

tzdata(8), setup-alpine(8) β€” go read your other faves, they're literally right there πŸ’…


πŸ‘‘ AUTHORS πŸ‘‘

Natanael Copa <ncopa@alpinelinux.org> and others. thank you for your service, king 🫑✨


and that's the whole page bestie!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

this iconic lil number comes to you from Alpine Linux, dated 2026-06-09 β€” go set your timezone, mwah πŸ’‹

πŸ“¦ where this page comes from