nerdexam
CompTIA

LX0-104 · 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 is used by the resolver library to configure system-wide DNS name resolution, often containing domain or search directives.

Networking Fundamentals

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

(37 responses)
  • A
    3% (1)
  • C
    3% (1)
  • D
    95% (35)

Why each option

The `/etc/resolv.conf` file is used by the resolver library to configure system-wide DNS name resolution, often containing `domain` or `search` directives.

Aorder hosts,bind

`order hosts,bind` is a directive found in `/etc/host.conf`, not `/etc/resolv.conf`.

B192.168.168.4 dns-server

An IP address followed by a hostname (like `192.168.168.4 dns-server`) is typically found in `/etc/hosts`, not `/etc/resolv.conf`.

Chosts: files,dns

`hosts: files,dns` is a directive found in `/etc/nsswitch.conf`, which determines the lookup order for hostnames, not in `/etc/resolv.conf`.

Ddomain mycompany.comCorrect

The `domain` directive in `/etc/resolv.conf` specifies the default domain name to be appended to hostnames that are not fully qualified during DNS lookups.

Concept tested: /etc/resolv.conf directives

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

Topics

#DNS configuration#resolv.conf

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice