SK0-004 · Question #928
An administrator regularly patches a server from different websites on the same domain and wishes to avoid excessive typing. Which of the following should the administrator configure on the server?
The correct answer is D. echo "servers patchesareus.org" >> /etc/resolv.conf. Adding a domain search directive to /etc/resolv.conf with the append operator allows the Linux resolver to automatically complete short hostnames, eliminating the need to type full FQDNs each time.
Question
An administrator regularly patches a server from different websites on the same domain and wishes to avoid excessive typing. Which of the following should the administrator configure on the server?
Options
- Aecho "search patchesareus.org" >> /etc/resolv.conf
- Becho "domain patchesareus.org" > /etc/resolv.conf
- Cecho "default patchesareus.org" > /etc/resolv.conf
- Decho "servers patchesareus.org" >> /etc/resolv.conf
How the community answered
(46 responses)- A9% (4)
- B4% (2)
- C13% (6)
- D74% (34)
Why each option
Adding a domain search directive to /etc/resolv.conf with the append operator allows the Linux resolver to automatically complete short hostnames, eliminating the need to type full FQDNs each time.
The 'search' directive configures a multi-domain search list intended for environments with several possible suffixes, rather than configuring a single authoritative domain entry for the server's resolver.
Using a single '>' operator truncates and overwrites /etc/resolv.conf entirely, destroying existing nameserver addresses and other resolver settings already present in the file.
'default' is not a recognized /etc/resolv.conf directive keyword and would be silently ignored by the resolver, producing no change in hostname resolution behavior.
Using '>>' appends to /etc/resolv.conf rather than overwriting it, which preserves existing nameserver and resolver entries critical to network operation. Adding a domain-related entry enables the resolver to automatically append the configured suffix to unqualified hostnames, so the administrator can type short names instead of fully qualified domain names when accessing hosts on patchesareus.org.
Concept tested: Linux DNS resolver configuration via /etc/resolv.conf
Source: https://man7.org/linux/man-pages/man5/resolv.conf.5.html
Topics
Community Discussion
No community discussion yet for this question.