I'm using systemd-resolved configured for mDNS. host command takes a long time on .local queries. Example:

$ time host blah.local
;; connection timed out; no servers could be reached

real    0m10.019s
user    0m0.016s
sys     0m0.005s

The above is a bad query (host blah.local does not exist), but the same happens with other queries as well:

$ time host valid.local
valid.local has address
;; connection timed out; no servers could be reached

real    0m10.021s
user    0m0.011s
sys     0m0.011s

where it quickly displays the IP of the host and then spends those 10s doing something.

How can I troubleshoot this?

1 Answer 1


You want to use "host" command to resolve hostnames with ".local" domains ?

I think this wil not work, cuz "host" command is using DNS Server to resolve the requested hostname.

Since "valid.local" doesnt have a DNS-Record , this will fail.

Commands like "ping" uses "/etc/hosts" to resolve the hostname

  • 1
    Actually, host valid.local resolves fine, just there's a 10s delay after that for some reason that I'm trying to track down. Sep 12, 2020 at 23:19
  • as I have answered above. "host" command is using DNS-Server and you can only resolve it if you have changed the configuration of "/etc/resolve.conf" . If ypu wnat to know what happens to your request , try strace host valiud.local you can also take a look at similar post: unix.stackexchange.com/questions/457166/…
    – Vafa
    Sep 13, 2020 at 22:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .