
To be able to use the hostname of local machine names without the fully qualified domain name, add a line to /etc/nf with the local domain such as: You can fix that by setting the following option in /etc/nf: If you experience a 5 second delay when resolving hostnames it might be due to a DNS-server/Firewall misbehaving and only giving one reply to a parallel A and AAAA request. If you are confronted with a very long hostname lookup (may it be in pacman or while browsing), it often helps to define a small timeout after which an alternative nameserver is used. Tip: If you want multiple processes to write to /etc/nf, you can use resolvconf. A domain name can be resolved through NSS using: NSS databases can be queried with getent(1). nss-mymachines(8) - provides hostname resolution for the names of local systemd-machined(8) containers.nss-myhostname(8) - provides local hostname resolution without having to edit /etc/hosts, described in Network configuration#Local hostname resolution.nss-resolve(8) - a caching DNS stub resolver, described in systemd-resolved.

Systemd provides three NSS services for hostname resolution: dns: the glibc resolver which reads /etc/nf, see nf(5).files: reads the /etc/hosts file, see hosts(5).The database responsible for domain name resolution is the hosts database, for which glibc offers the following services: NSS allows system databases to be provided by separate services, whose search order can be configured by the administrator in nf(5). The Name Service Switch (NSS) facility is part of the GNU C Library ( glibc) and backs the getaddrinfo(3) API, used to resolve domain names. Reason: Mention nss-mdns, nss-tls-git AUR and others.
