Paths/DevOps Engineer/Networking / DNS
Resolve a Hostname
Before a connection is made, a name becomes an IP. Resolve lab.internal with dig, compare with /etc/hosts and record the answer.
Validator
IDLE — checks run live as you type commands; submit when done
01Requirements
live checks- Directory ~/report exists○
- File ~/report/dns.txt exists and contains the IP for lab.internal○
02Walkthrough
5 steps- 01
Check the resolver configuration
cat /etc/resolv.conf shows which DNS servers the system asks — nameserver 127.0.0.53 is the local systemd resolver.
cat /etc/resolv.conf - 02
Check /etc/hosts
Before DNS is queried, the OS checks /etc/hosts. lab.internal → 10.0.0.42 is mapped there — static entries always win.
cat /etc/hosts - 03
Query DNS with dig
dig asks the resolver directly. The ANSWER SECTION shows lab.internal. 300 IN A 10.0.0.42 — an A record mapping the name to an IPv4 address, cached for 300 seconds.
dig lab.internal - 04
Record the answer
Write the resolved IP into the report file.
echo 'lab.internal: 10.0.0.42' > ~/report/dns.txt - 05
Verify and submit
cat the file, then submit.
cat ~/report/dns.txt
03Stuck?
0 of 3 revealedTake a hint without losing the lab — each one points at the thing to look at, not at the answer.
04AI Tutor
guides, never solvesTell me what you're stuck on — I'll nudge, not solve. Which requirement are you looking at?
04Notebook
saved locally in this browserlearner@lab — ubuntu:24.04
Session is disposable
↑/↓ recalls commands · Ctrl+Enter submits · type help for the command list