LPIC-1 Essential System Services and Networking Practice Question
Which THREE of the following are valid files or directories used by the Domain Name System (DNS) resolution process on a Linux system?
⚠ Common exam trap
Many exam-takers confuse server-side DNS configuration files (like `/etc/named.conf`) with client-side resolution files, or they overlook `/etc/host.conf` and `/etc/nsswitch.conf` as essential parts of the DNS resolution chain.
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/host.conf
Option A, /etc/host.conf, is correct because it is a legacy configuration file that tells the resolver library the order in which resolution services are queried (e.g., 'order hosts,bind'), directly affecting how hostnames are resolved. Option B, /etc/resolv.conf, is correct because it defines the DNS resolver configuration, listing nameserver IP addresses, the search domain, and options such as ndots and timeout used by the resolver. Option E, /etc/nsswitch.conf, is correct because its 'hosts:' line specifies the Name Service Switch order (e.g., 'files dns') that determines whether /etc/hosts, DNS, or other sources are consulted during name resolution. Option C, /etc/named.conf, is not part of the client resolution process; it is the main configuration file for the BIND (named) DNS server daemon. Option D, /etc/sysconfig/network, is a Red Hat-style file for general network settings like hostname and gateway, not a DNS resolver file.
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/host.conf
Why this is correct
/etc/host.conf configures the order in which the resolver consults sources such as hosts, bind and nis, satisfying the stem's requirement for a valid DNS resolution file. It is read by glibc's resolver, letting administrators prioritise local /etc/hosts entries over DNS queries or vice versa.
- ✓
/etc/resolv.conf
Why this is correct
/etc/resolv.conf satisfies the resolver configuration requirement: it lists the nameserver IP addresses the system queries, plus search domains and options. The glibc resolver reads it directly for every lookup, making it a valid DNS resolution file.
- ✗
/etc/named.conf
Why it's wrong here
`/etc/named.conf` configures a BIND server's zones and options; it is not consulted by the client resolver during DNS lookups. It is tempting because it is the central DNS file on many Linux systems, and would be the right answer if the question asked about configuring an authoritative or caching name server.
- ✗
/etc/sysconfig/network
Why it's wrong here
`/etc/sysconfig/network` holds hostname and routing settings on Red Hat systems; the resolver never reads it for name lookups. It is tempting because it is a genuine network configuration file, and would be correct if the question asked where to set the persistent hostname or default gateway.
- ✓
/etc/nsswitch.conf
Why this is correct
/etc/nsswitch.conf governs the order in which name-service sources are consulted, letting the hosts database list files, dns or myhostname. DNS resolution on Linux therefore depends on it, because it decides whether the resolver queries /etc/hosts or the configured nameservers first.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-1 question from scratch — 402 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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.