nerdexam
CompTIA

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.

Server administration

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)
  • A
    9% (4)
  • B
    4% (2)
  • C
    13% (6)
  • D
    74% (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.

Aecho "search patchesareus.org" >> /etc/resolv.conf

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.

Becho "domain patchesareus.org" > /etc/resolv.conf

Using a single '>' operator truncates and overwrites /etc/resolv.conf entirely, destroying existing nameserver addresses and other resolver settings already present in the file.

Cecho "default patchesareus.org" > /etc/resolv.conf

'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.

Decho "servers patchesareus.org" >> /etc/resolv.confCorrect

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

#DNS resolv.conf#domain search#Linux networking#DNS configuration

Community Discussion

No community discussion yet for this question.

Full SK0-004 Practice