Courseiva
Troubleshooting →mediumMultiple Choice

XK0-006 Troubleshooting Practice Question

A Linux administrator is troubleshooting a server that cannot resolve hostnames. The administrator suspects a misconfiguration in the DNS resolver. Which file should be checked first to verify the DNS server addresses?

⚠ Common exam trap

The trap here is assuming that DNS server addresses are stored in interface configuration files, but on most modern systems, /etc/resolv.conf is the authoritative resolver configuration file.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

/etc/resolv.conf

/etc/resolv.conf is the standard file for configuring DNS resolvers on Linux. It contains nameserver entries that specify the IP addresses of DNS servers. Checking this file directly verifies the DNS server addresses in use. Other files may influence resolution but do not store the DNS server addresses themselves.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    /etc/nsswitch.conf

    Why it's wrong here

    /etc/nsswitch.conf defines the order in which name service sources are queried, such as files, dns, or nis. While it controls whether DNS is used, it does not contain DNS server addresses. A misconfiguration here could skip DNS, but the scenario asks to verify DNS server addresses, which are not stored in this file.

  • ✗

    /etc/hosts

    Why it's wrong here

    /etc/hosts contains static hostname-to-IP mappings and is consulted before DNS. While a misconfiguration here could cause resolution issues for specific hosts, it does not contain DNS server addresses. The scenario specifically asks for DNS server addresses, so this file is not the primary place to check for resolver configuration.

  • ✓

    /etc/resolv.conf

    Why this is correct

    /etc/resolv.conf lists the DNS servers (nameservers) that the system queries for hostname resolution. It is the primary configuration file for the resolver. Checking this file verifies which DNS servers are configured and if they are reachable. A missing or incorrect nameserver entry here would directly cause hostname resolution failures.

  • ✗

    /etc/sysconfig/network-scripts/ifcfg-eth0

    Why it's wrong here

    ifcfg-eth0 contains network interface configuration, including IP address, netmask, and gateway. It may also include DNS settings for some distributions, but these are typically managed by network managers that write to /etc/resolv.conf. The authoritative file for resolver configuration is /etc/resolv.conf, not the interface configuration file.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

One of 781 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.