On 24/10/23 06:01, Max Nikulin wrote:
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.

Ah, thanks. But I don't feel too bad about not finding that ... 'service' is not defined in that file, 'dns' doesn't occur, and searching for 'hosts' doesn't give anything useful either. I guess reading nsswitch.conf(5) is required.

Thanks,
Richard

Reply via email to