CompTIA Linux+ (XK0-005) — Question 263
A systems administrator receives reports of issues in one of the Linux systems. The following output has been provided:
# dig node.mycomptia.org
; <<>> DiG 9.11.36.x.x. <<>> node.mycomptia.org
;; global options: +cmd
;; connection timed out; no servers could be reached
# cat /etc/resolv.cont
search mycomptia.org
Which of the following actions will best resolve this issue? (Choose two.)
Answer options
- A. echo "8.8.8.8 node.mycomptia.org" >> /etc/hosts
- B. echo "nameserver 8.8.8.8" >> /run/systemd/resolve/resolv.conf
- C. systemctl restart networkd
- D. echo "8.8.8.8" >> /etc/resolv.cont
- E. echo "DNS1=8.8.8.8" >> /etc/sysconfig/network-scripts/ifcfg-eth0
- F. systemetl restart NetworkManager
- G. systemctl restart named
Correct answer: B, F
Explanation
The correct answer is B, as adding a nameserver entry for 8.8.8.8 to the resolv.conf file will help the system reach DNS servers. Option F is also valid because restarting NetworkManager can help apply the new DNS settings. The other options do not effectively resolve the DNS connectivity issue.