resolvectl A system administrator is troubleshooting a DNS issue on a modern Linux server that utilizes systemd-resolved. The administrator needs to view the complete list of current and fallback DNS servers being used by the system, along with the DNS domains for each interface. Which of the following commands will provide the most comprehensive output for this task?
The correct command is resolvectl status. This command is the standard tool for interacting with the systemd-resolved service and provides a detailed, comprehensive report of the DNS configuration, including global settings, per-link DNS servers, and current DNS server information.
cat /etc/resolv.conf is incorrect because on systems using systemd-resolved, this file is often a symbolic link to a stub file (e.g., /run/systemd/resolve/stub-resolv.conf) which typically only lists the local caching resolver 127.0.0.53. This does not show the actual upstream DNS servers the system is configured to use.
dig example.com is incorrect as dig is a tool used to perform DNS lookups and query specific name servers; it does not display the client's own resolver configuration settings.
systemctl status systemd-resolved is incorrect because it shows the status of the systemd-resolved service daemon itself (e.g., if it is active, enabled, or has failed) along with recent log entries, but it does not display the detailed DNS server and domain configuration.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is `systemd-resolved` and why is it important?
Open an interactive chat with Bash
How does `resolvectl status` compare to `cat /etc/resolv.conf`?
Open an interactive chat with Bash
When should you use `dig` versus `resolvectl`?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .