Is there any effect on name resolution if /etc/nsswitch.conf changed as "hosts: dns files" in Red Hat Enterprise Linux?

Solution Verified - Updated -

Issue

  • What happens while accessing localhost when, /etc/nsswitch.conf is set as hosts: dns files?
  • There is a hostname record both in DNS and /etc/hosts with different IPs. Which record will be used?
  • What is the priority of the Name Resolution?

Environment

  • Red Hat Enterprise Linux all version

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content