nerdexam
CompTIA

LX0-104 · Question #670

Which of the following statements is valid in the file /etc/resolv.conf?

The correct answer is D. domain example.com. The /etc/resolv.conf file is used to configure DNS name resolution settings, where domain specifies the local domain name to be used for unqualified hostnames.

Networking Fundamentals

Question

Which of the following statements is valid in the file /etc/resolv.conf?

Options

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

How the community answered

(28 responses)
  • B
    4% (1)
  • C
    4% (1)
  • D
    93% (26)

Why each option

The `/etc/resolv.conf` file is used to configure DNS name resolution settings, where `domain` specifies the local domain name to be used for unqualified hostnames.

Aorder hosts, bind

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

B192.168.168.4 dns server

`192.168.168.4 dns server` is an invalid syntax for specifying a nameserver; the correct syntax is `nameserver 192.168.168.4`.

Chosts: files, dns

`hosts: files, dns` is a configuration line for `/etc/nsswitch.conf`, which determines the order of name service lookups, and is not valid in `/etc/resolv.conf`.

Ddomain example.comCorrect

The `domain example.com` statement is a valid entry in `/etc/resolv.conf` that defines the default domain name to append to unqualified hostnames when performing DNS lookups, allowing for simpler hostname resolution within a local domain.

Concept tested: /etc/resolv.conf syntax

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

Topics

#/etc/resolv.conf#DNS configuration#domain keyword

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice