SETUP-HOSTNAME(8)

πŸ“¦ version 3.22.0, in alpine 3.24

πŸ’– NAME πŸ’–

okay so this is setup-hostname(8) from the System Manager’s Manual β€” the page for setup-hostname, which literally sets the system hostname. bestie, it’s giving β€œtiny but crucial.” ✨

πŸŽ€ SYNOPSIS πŸŽ€

setup-hostname [-h] [HOSTNAME]

πŸ¦‹ DESCRIPTION πŸ¦‹

setup-hostname writes HOSTNAME to /etc/hostname. no cap, that’s the whole main-character move. 🫢

Hostnames are limited to 255 characters and may only contain letters, digits (0-9), periods (.) and hyphens (-). A hostname must not start with a hyphen or period. that’s the vibe check, and it is strict. πŸ’…

If HOSTNAME is given, it is validated and written. If validation fails the script exits with an error. 😭

Without HOSTNAME, the current hostname is the default and the user is prompted for a value. so it’s like, β€œhey bestie, what are we naming this thing?” 🌸

✨ OPTIONS ✨

  • -h β€” display usage information and exit. that’s it, that’s the option list, and she ate. πŸ’…

πŸ“ FILES πŸ“

  • /etc/hostname β€” system hostname file. This file is read at boot. so yeah, she’s important. πŸ”₯

🌈 EXIT STATUS 🌈

  • 0 β€” success. slay. ✨
  • 1 β€” the specified hostname failed validation. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

go check out hostname(1) and setup-alpine(8) if you’re feeling extra. iykyk. πŸ’œ

πŸ’œ AUTHORS πŸ’œ

Natanael Copa <ncopa@alpinelinux.org> and others. icons only. πŸ‘‘


🌸 xoxo, Alpine Linux β€” 2026-06-09 β€” setup-hostname(8) out πŸ’–

πŸ“¦ where this page comes from