Courseiva
mediumMultiple SelectObjective-mapped

XK0-006 Practice Question: A user is unable to resolve hostnames on a Linux…

A user is unable to resolve hostnames on a Linux system. Which three configuration files should be checked? (Select THREE).

⚠ Common exam trap

CompTIA often tests the misconception that /etc/hostname or /etc/sysconfig/network are involved in hostname resolution, when in fact they only affect the local system's identity, not the resolution of external hostnames.

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/hosts

The /etc/hosts file is a static table mapping hostnames to IP addresses, used for local name resolution before or instead of DNS queries. If a user cannot resolve hostnames, this file may be misconfigured or missing entries for the target hostnames, causing resolution failures.

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/hosts

    Why this is correct

    Static mapping of hostnames to IP addresses.

  • /etc/nsswitch.conf

    Why this is correct

    Defines the order of name resolution sources (e.g., files, dns).

  • /etc/resolv.conf

    Why this is correct

    Specifies DNS servers and search domains.

  • /etc/hostname

    Why it's wrong here

    Stores the local hostname, not involved in name resolution.

  • /etc/sysconfig/network

    Why it's wrong here

    Contains network settings but not directly for hostname resolution.

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

Courseiva writes every XK0-006 question from scratch — 979 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.