avahi-resolve-host-name
Resolve mDNS hostname to IP address
TLDR
View documentation for the original command
SYNOPSIS
avahi-resolve-host-name [-4|-6] [-v] [-h|-V] HOSTNAME [HOSTNAME ...]
PARAMETERS
-h, --help
Show help and exit
-V, --version
Print version info
-v, --verbose
Increase verbosity
-4
Resolve IPv4 addresses only
-6
Resolve IPv6 addresses only
DESCRIPTION
avahi-resolve-host-name is a command-line tool from the Avahi suite for Linux/Unix systems implementing multicast DNS (mDNS) and DNS-SD (Zeroconf/Bonjour). It queries the Avahi daemon to resolve hostnames—typically .local domains—to their IPv4 and/or IPv6 addresses on the local network.
Ideal for discovering devices like printers, servers, or IoT gadgets advertising via mDNS without central DNS. Run it standalone; output format is IP_ADDRESS HOSTNAME per line. Supports multiple hostnames and selective address families (IPv4/IPv6). Verbose mode aids debugging timeouts or cache issues.
Common in desktop environments (GNOME, KDE) and embedded systems. Requires avahi-daemon service active. Enhances local networking by bypassing /etc/hosts or routers' DNS.
CAVEATS
Requires running avahi-daemon; fails silently on non-mDNS names; no wildcard support beyond basics; IPv6 may need network config.
EXAMPLE OUTPUT
myhost.local
192.168.1.100 myhost.local
fe80::1234 myhost.local
USAGE TIPS
Combine with -4 for IPv4-only; pipe to grep/.local for filtering; timeout ~1s per query.
HISTORY
Introduced in Avahi 0.6 (2005) by Lennart Poettering; evolved with mDNS standards (RFC 6762); standard in most distros since ~2007 for Zeroconf.
SEE ALSO
avahi-resolve-address(1), avahi-browse(1), avahi-publish-host-name(1), host(1), dig(1)


