domainname(1)

domainname1

Set or print yp domain of current host system

Usage

domainname [name-of-domain]

Overview

The domainname utility prints the YP domain name of the current host. The superuser can set the domain name by supplying a /etc/defaultdomain file (see defaultdomain(5)). This is used at system boot time by rc(8) to initialize the domainname.

Releases

61 releases since OpenBSD 2.1; the text changed 12 times.

  1. 2.1
  2. 2.2–2.3
  3. 2.4
  4. 2.5
  5. 2.6
  6. 2.7–2.9
  7. 3.0–3.1
  8. 3.2–3.3
  9. 3.4–3.5
  10. 3.6–3.7
  11. 3.8–4.1
  12. 4.2–5.1
  13. 5.2–8.0

History

The domainname utility is derived from the hostname(1) utility, which appeared in 4.2BSD. The domainname utility appeared in NetBSD 0.8.

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.