Re: host hostname not found
On Fri, Sep 05, 2014 at 06:13:28PM -0400, Podrigal, Aron wrote:
> So yes, host does not look in /etc/hosts by default.
It never looks in /etc/hosts, as others have pointed out, host(1) only checks
DNS.
When a program wants to resolve a host, it does so using some system calls that
may or may not check DNS, and might check other things before or after DNS.
What is checked, and in what order, is defined in /etc/nsswitch.conf.
If you want to resolve a host and want to get the answer the system will give
you (irrespective of DNS), try
getent hosts some-hostname
Reply to: