hostname(1)

hostname1

Show or set system host name

Usage

hostname [OPTION ...] [NAME]

Overview

Show or set the system's host name.

-a, --aliases

alias names

-d, --domain

DNS domain name

-f, --fqdn, --long

DNS host name or FQDN

-F, --file=FILE

set host name or NIS domain name from FILE

-i, --ip-addresses

addresses for the host name

-s, --short

short host name

-y, --yp, --nis

NIS/YP domain name

-?, --help

give this help list

--usage

give a short usage message

-V, --version

print program version

Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.

Releases

19 releases since Debian 1.1 (Buzz); the text changed 13 times.

  1. 1.1
  2. 1.2–1.3
  3. 2.0–2.1
  4. 2.2–3.0
  5. 3.1
  6. 4.0
  7. 5.0
  8. 6.0
  9. 7
  10. 8
  11. 9
  12. 10–12
  13. 13
  14. Arch

--aliases since Arch Linux 2026-11-01; --ip-addresses since Arch Linux 2026-11-01; --nis since Debian 1.2 (Rex); --usage since Arch Linux 2026-11-01; --yp since Debian 1.2 (Rex); -? since Arch Linux 2026-11-01; -V since Debian 1.2 (Rex); -y since Debian 1.2 (Rex).

--alias until Debian 13 (Trixie); --all-fqdns until Debian 13 (Trixie); --all-ip-addresses until Debian 13 (Trixie); --boot until Debian 13 (Trixie); --ip-address until Debian 13 (Trixie); --verbose until Debian 7 (Wheezy); -A until Debian 13 (Trixie); -I until Debian 13 (Trixie); -b until Debian 13 (Trixie); -h until Debian 13 (Trixie); -v until Debian 7 (Wheezy).

Author

Written by Debarshi Ray.

Reporting bugs

Report bugs to <[email protected]>.

From inetutils 2.8-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.