XK0-006 Troubleshooting Practice Question
A server running RHEL 8 has intermittent network connectivity. The administrator wants to view the current DNS resolver configuration. Which file should be examined?
⚠ Common exam trap
Watch out — candidates often confuse interface configuration files (like ifcfg-eth0) or name service switch files (nsswitch.conf) with the actual DNS resolver configuration, leading candidates to pick a file that only indirectly affects DNS.
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
The /etc/resolv.conf file is the standard configuration file that lists the DNS nameservers (via 'nameserver' directives) and search domains used by the resolver. On RHEL 8, even when NetworkManager manages DNS, the effective resolver configuration is written to /etc/resolv.conf (often as a symlink to /run/NetworkManager/resolv.conf). Therefore, examining this file shows the current DNS resolver settings.
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/sysconfig/network-scripts/ifcfg-eth0
Why it's wrong here
ifcfg-eth0 stores interface addressing and boot protocol settings, not the resolver; on RHEL 8 DNS servers live in /etc/resolv.conf, which is generated from NetworkManager or the active connection profile. It is tempting because it configures the eth0 interface, and it would be correct for setting a static IP or gateway.
- ✗
/etc/nsswitch.conf
Why it's wrong here
nsswitch.conf defines the name service switch order (files, dns, nis) that determines which sources resolve hostnames; it holds no resolver addresses or options. It is tempting because it governs name resolution behaviour, and would be the right file when diagnosing whether DNS is consulted before /etc/hosts.
- ✓
/etc/resolv.conf
Why this is correct
/etc/resolv.conf holds the active DNS resolver configuration, listing nameserver entries the system queries. On RHEL 8, NetworkManager or systemd-resolved may rewrite it dynamically, so it reflects the current resolver state rather than static intent. Examining it directly satisfies the administrator's need to view live DNS settings causing intermittent connectivity.
- ✗
/etc/hosts
Why it's wrong here
/etc/hosts maps static hostname-to-IP entries locally and contains no nameserver, search or options directives, so it cannot reveal the resolver configuration. It is tempting because it participates in name resolution, and would be the correct file to inspect when a stale static entry overrides DNS lookups.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every XK0-006 question from scratch — 781 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
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.