On 22/10/2023 18:39, Richard Hector wrote:
But not strictly a DNS lookup tool:
richard@zircon:~$ getent hosts zircon
127.0.1.1 zircon.lan.walnut.gen.nz zircon
That's from my /etc/hosts file, and overrides DNS. I didn't see an
option in the manpage to ignore /etc/hosts.
getent -s dns hosts zircon
However /etc/resolv.conf may point to local systemd-resolved server or
to dnsmasq started by NetworkManager and they read /etc/hosts by default.
I haven't found a way to get just DNS results, without pulling in extra
software.
Usual task for application is to resolve hostname and enough methods
besides DNS may be used: multicast DNS, LLMNR, etc. If you need a debug
tool then you should install it. On the other hand it is desperate when
a feature is implemented, but not exposed to users.