nerdexam
Linux_Foundation

LFCS · Question #527

Which of the following statements is true regarding the following /etc/resolv.conf file? search example.com nameserver 208.77.188.166 nameserver 208.77.188.167

The correct answer is D. example.com will be appended to host names when they do not contain dots. The search directive in /etc/resolv.conf specifies domain names to append to unqualified hostnames (those without dots) during DNS lookups.

Submitted by kevin_r· Apr 18, 2026Networking

Question

Which of the following statements is true regarding the following /etc/resolv.conf file? search example.com nameserver 208.77.188.166 nameserver 208.77.188.167

Options

  • AThere is a syntax error.
  • BIf DNS queries to the localhost fail, the server 208.77.188.166 will be queried.
  • Cexample.com will be appended to all host lookups.
  • Dexample.com will be appended to host names when they do not contain dots.
  • EThe DNS server with the shortest ping time will be queried first. If the lookup fails, the second

How the community answered

(57 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    2% (1)
  • D
    88% (50)
  • E
    7% (4)

Why each option

The `search` directive in `/etc/resolv.conf` specifies domain names to append to unqualified hostnames (those without dots) during DNS lookups.

AThere is a syntax error.

The provided `/etc/resolv.conf` file has correct syntax for both `search` and `nameserver` directives.

BIf DNS queries to the localhost fail, the server 208.77.188.166 will be queried.

The `/etc/resolv.conf` file does not specify localhost (127.0.0.1) as a nameserver; DNS queries would go directly to the listed nameservers in order.

Cexample.com will be appended to all host lookups.

`example.com` is appended only to unqualified hostnames (those without dots), not to all host lookups, as fully qualified domain names are resolved as-is.

Dexample.com will be appended to host names when they do not contain dots.Correct

The `search` directive in `/etc/resolv.conf` defines a list of domain names that the resolver will automatically append to hostnames that do not contain any dots. This means if you query for `webserver`, the resolver will first try `webserver.example.com`.

EThe DNS server with the shortest ping time will be queried first. If the lookup fails, the second

DNS resolvers typically query nameservers in the order they are listed in `/etc/resolv.conf` (208.77.188.166 then 208.77.188.167), not based on ping time or network latency.

Concept tested: DNS resolver configuration (`/etc/resolv.conf` `search` directive)

Source: https://man7.org/linux/man-pages/man5/resolv.conf.5.html

Topics

#resolv.conf#DNS resolution#search directive#unqualified hostnames

Community Discussion

No community discussion yet for this question.

Full LFCS Practice