myname(5)

myname5

Default hostname

Overview

The myname file is read by rc(8) at system startup time.

/etc/myname contains the symbolic name of the host machine. The file should contain a single line specifying the fully qualified domain name (FQDN) of the system (e.g. host.example.com). The name must be resolvable, either by matching a hostname specified in /etc/hosts (see hosts(5)) or through DNS (see resolv.conf(5)). The hostname is set via the hostname(1) utility at boot time. See hostname(7) for a description of hostname resolution.

Empty lines and lines beginning with ‘#’ are ignored.

Files

/etc/myname

Default hostname.

Releases

48 releases since OpenBSD 3.4; the text changed 9 times.

  1. 3.4–3.6
  2. 3.7–3.8
  3. 3.9–4.0
  4. 4.1
  5. 4.2–5.6
  6. 5.7–6.1
  7. 6.2–6.8
  8. 6.9
  9. 7.0–7.6
  10. 7.7–8.0

History

Support for the file /etc/myname first appeared in 386BSD 0.1.

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