host command not seeming to use /etc/hosts file
Robert Moskowitz
rgm at htt-consult.com
Fri May 2 02:35:54 UTC 2014
On 05/01/2014 05:12 PM, Chris Adams wrote:
> Once upon a time, Robert Moskowitz <rgm at htt-consult.com> said:
>> Kind of thought so. So is there an equiv command that follows
>> system priorities for both dns and hosts file?
> getent hosts www.google.com
>
> That will follow the IPv6-before-IPv4 rules (so by default, if the host
> has an IPv6 entry, only that will be shown).
Yes. It is stopping at the ipv6 address
> To see all the matches, IPv6 and IPv4, you can use "ahosts" instead
comannd not found. I will have to figure out what rpm provides it, as
it was not part of the base f20 install. But thanks
> (which also has "ahostsv4" and "ahostsv6" to get only a specific address
> family). That will return all socket types (so usually STREAM, DGRAM,
> and RAW). This is done via a calls to getaddrinfo() and so should match
> the behavior of modern (akak IPv6-ready) programs.
>
More information about the users
mailing list