nerdexam
Linux_Foundation

LFCS · Question #262

Which of the following lines would an administrator find in the file /etc/resolv.conf?

The correct answer is D. domain mycompany.com. The /etc/resolv.conf file configures the DNS resolver client, including the default domain for hostname resolution.

Submitted by chiamaka_o· Apr 18, 2026Networking

Question

Which of the following lines would an administrator find in the file /etc/resolv.conf?

Options

  • Aorder hosts,bind
  • B192.168.168.4 dns-server
  • Chosts: files,dns
  • Ddomain mycompany.com

How the community answered

(48 responses)
  • A
    6% (3)
  • B
    2% (1)
  • C
    2% (1)
  • D
    90% (43)

Why each option

The /etc/resolv.conf file configures the DNS resolver client, including the default domain for hostname resolution.

Aorder hosts,bind

The `order` directive is used in older resolver configurations or within /etc/nsswitch.conf to specify lookup order, not /etc/resolv.conf.

B192.168.168.4 dns-server

An entry like `192.168.168.4 dns-server` is a hostname-to-IP mapping, which belongs in /etc/hosts or a DNS zone file, not /etc/resolv.conf.

Chosts: files,dns

The `hosts` directive is part of /etc/nsswitch.conf, which defines the order of name service lookups, not /etc/resolv.conf.

Ddomain mycompany.comCorrect

The `domain` directive in /etc/resolv.conf specifies the default domain name that is appended to unqualified hostnames when performing DNS lookups. For example, if `domain mycompany.com` is set, a lookup for `server1` would attempt to resolve `server1.mycompany.com`.

Concept tested: /etc/resolv.conf directives

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

Topics

#resolv.conf#DNS client#Networking configuration#Name resolution

Community Discussion

No community discussion yet for this question.

Full LFCS Practice