host command not seeming to use /etc/hosts file

Robert Moskowitz rgm at htt-consult.com
Thu May 1 21:04:42 UTC 2014


On 05/01/2014 04:56 PM, Ed Greshko wrote:
> On 05/02/14 04:52, Robert Moskowitz wrote:
>> F20
>>
>> I put an IPv4 entry for a server in my /etc/hosts file.  I can 'ping bob', but 'host bob' comes back with:
>>
>> Host bob not found: 3(NXDOMAIN)
>>
>> I have this vague memory from years back about a file that set precedence of hosts file and dns for fqdn lookup.  Can't remember it of find it.
>>
>> Of course the problem might simply be the host command is incapable of processing the /etc/hosts file?
>>
>> thanks for any help on this.
>>
>>
> The host command does only DNS lookups.
>
Well that is a straightforward answer.

Kind of thought so.  So is there an equiv command that follows system 
priorities for both dns and hosts file?




More information about the users mailing list