3

I know that dig queries the DNS server in the /etc/resolv.conf but I read that the difference between dig and nslookup is that dig uses OS resolver libraries. But what are the OS resolver libraries?

1 Answer 1

2

OS resolver libraries are functions (mainly gethostbyname() and gethostbyaddr()) which are part of the C library and which allow to resolve hostnames to IP addresses. To do so, they use the configuration file /etc/nsswitch.conf to decide whether they must resort to DNS, NIS, or to a simple hosts lookup file.

On the other hand, nslookup uses its own internal resolver. For some time this command used to be deprecated.

Related question: dig vs nslookup

You must log in to answer this question.

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