Once upon a time, Robert Moskowitz <r...@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).

To see all the matches, IPv6 and IPv4, you can use "ahosts" instead
(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.

-- 
Chris Adams <li...@cmadams.net>
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to