Unofficial practice
DNS and Route First Response
A host cannot reach a name or address. Separate routing, interface selection, and DNS resolution before blaming the application.
Linux One Liners is an independent study and practice resource. It is not affiliated with, endorsed by, or approved by LPI, The Linux Foundation, CompTIA, or any certification provider. This site does not provide exam dumps or real exam questions.
Try first
ip route get 1.1.1.1 && dig +short example.com
Troubleshooting ladder
- Name the symptom.
- Inspect read-only state.
- Find the owner, service, file, device, mount, or route.
- Read the decisive output field.
- Choose the next narrow command.
- Avoid broad or destructive changes.
- Make the smallest justified change if required.
- Verify and record what changed.
drill evidence
Sample output and answer key
Command anatomy
ip route get 1.1.1.1 && dig +short example.com
ip route- show which route would be used
resolvectl/dig- test name resolution
ss- show listening sockets when relevant
destination- the host, name, or port being tested
Annotated output
1.1.1.1 via 192.168.10.1 dev wlan0 src 192.168.10.132 uid 1000
example.com: 93.184.216.34 -- link: wlan0
93.184.216.34
What to notice
- via
- the gateway used
- dev
- the interface selected
- src
- the local address chosen
- resolved address
- whether DNS returned an answer
Safe vs unsafe move
Common wrong move
Calling it a DNS outage when the route or gateway is wrong.
Next safe command
resolvectl status
Goal
Prove the condition with command output before changing the system.
Safe first command
ip route get 1.1.1.1 && dig +short example.com
Correct interpretation
The decisive fields are `via`, `dev`, `src`. The affected object is the selected route, interface, source address, or resolved name. The next safe command is `resolvectl status` because it narrows the evidence without jumping to a broad fix. Watch out for this wrong move: Calling it a DNS outage when the route or gateway is wrong.
Next safe command
resolvectl status
Common wrong move
Calling it a DNS outage when the route or gateway is wrong.
Self-check
Which field proves the selected gateway or interface, and which result proves DNS answered?
source and objective
Related cert objective
Source status: Linux Foundation LFCS page verified June 30, 2026. LFCS is an online, proctored, performance-based command-line exam.
Related command pages
Why this matters
The point is not to memorize a flag. It is to read the evidence, name the next safe check, and avoid the tempting broad fix.