---
name: "myname"
section: "5"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["openbsd"]
url: "https://new.carta.tech/myname"
---

# myname(5)

default hostname

## NAME

**myname** – default hostname

## DESCRIPTION

The **myname** file is read by [rc(8)](/rc/8.md) 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)](/hosts/5.md)) or through DNS (see [resolv.conf(5)](/resolv.conf/5.md)). The hostname is set via the [hostname(1)](/hostname/1.md) utility at boot time. See [hostname(7)](/hostname/7.md) for a description of hostname resolution.

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

## FILES

- */etc/myname*

  Default hostname.

## SEE ALSO

[hostname(1)](/hostname/1.md), [hostname.if(5)](/hostname.if/5.md), [hosts(5)](/hosts/5.md), [resolv.conf(5)](/resolv.conf/5.md), [hostname(7)](/hostname/7.md), [rc(8)](/rc/8.md)

## HISTORY

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