Advanced Linux & Shell Scripting
Q99 / 100

What is "DNS resolution order" as configured by "/etc/nsswitch.conf" and "/etc/resolv.conf", and how do they interact?

Correct! Well done.

Incorrect.

The correct answer is A) "/etc/nsswitch.conf" sets the order sources like "/etc/hosts" and DNS are consulted for hostname lookups, while "/etc/resolv.conf" configures the actual DNS servers and search domains queried — together determining how "example.com" resolves to an IP

A

Correct Answer

"/etc/nsswitch.conf" sets the order sources like "/etc/hosts" and DNS are consulted for hostname lookups, while "/etc/resolv.conf" configures the actual DNS servers and search domains queried — together determining how "example.com" resolves to an IP

Explanation

A common troubleshooting scenario involves checking "/etc/nsswitch.conf" to see if "hosts: files dns" means /etc/hosts entries take precedence over DNS, and checking "/etc/resolv.conf" to verify which DNS servers ("nameserver" lines) are actually being queried.

Progress
99/100