LPIC-1 Essential System Services and Networking Practice Question
A Linux administrator is troubleshooting a server that cannot resolve external hostnames. The server has a static IP address and can ping 8.8.8.8 successfully. The administrator checks /etc/resolv.conf and finds only 'nameserver 127.0.0.53'. Which command will best help determine the actual DNS servers being used and the resolution path?
⚠ Common exam trap
The trap here is assuming that /etc/resolv.conf contains the actual DNS servers, but with systemd-resolved it only shows the stub address, so tools like resolvectl are needed to see the real servers.
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
✓
resolvectl status
The resolvectl status command provides detailed information about the current DNS servers and resolution configuration for all interfaces, which is crucial for diagnosing why external hostnames cannot be resolved despite network connectivity.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
cat /etc/nsswitch.conf
Why it's wrong here
The nsswitch.conf file determines the order of name service sources (e.g., files, dns), but it does not show the actual DNS servers or their status. It is useful for checking if DNS is used at all, but not for identifying the specific DNS servers in use.
- ✓
resolvectl status
Why this is correct
resolvectl status displays the current DNS servers, DNS domains, and per-interface configuration managed by systemd-resolved. It reveals the actual upstream DNS servers and whether the stub resolver is functioning correctly, which is essential for diagnosing why external hostnames fail to resolve.
- ✗
nslookup google.com
Why it's wrong here
nslookup also queries the default resolver and provides an answer or error, but it does not display the underlying DNS server configuration or the resolution path. It is less informative than resolvectl for diagnosing systemd-resolved issues.
- ✗
dig google.com
Why it's wrong here
dig google.com queries the default resolver, but if the resolver is misconfigured, it may fail or return an error. It does not show which DNS servers are being used or the resolution path, so it is not the best tool for determining the actual DNS configuration.
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 and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official LPI exam blueprint
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.