nerdexam
CompTIA

LX0-104 · Question #59

Which of the following keywords can be used in the file /etc/nsswitch.conf to specify a source for host name lookups? (Choose TWO correct answers.)

The correct answer is B. dns D. files. The /etc/nsswitch.conf file defines the order and sources for various system databases, including hostname lookups, where dns specifies using DNS and files specifies using the /etc/hosts file. These keywords dictate the resolution preference for hostnames.

Networking Fundamentals

Question

Which of the following keywords can be used in the file /etc/nsswitch.conf to specify a source for host name lookups? (Choose TWO correct answers.)

Options

  • Aresolv
  • Bdns
  • Cremote
  • Dfiles
  • Ehosts

How the community answered

(33 responses)
  • A
    3% (1)
  • B
    94% (31)
  • C
    3% (1)

Why each option

The `/etc/nsswitch.conf` file defines the order and sources for various system databases, including hostname lookups, where `dns` specifies using DNS and `files` specifies using the `/etc/hosts` file. These keywords dictate the resolution preference for hostnames.

Aresolv

`resolv` is not a keyword used in `/etc/nsswitch.conf` to specify a source for host lookups; the relevant keyword for DNS is `dns`.

BdnsCorrect

The `dns` keyword in the `hosts:` line of `/etc/nsswitch.conf` specifies that the system should use the Domain Name System (DNS) for resolving hostnames, typically by querying servers listed in `/etc/resolv.conf`.

Cremote

`remote` is not a standard keyword for specifying a hostname lookup source in `/etc/nsswitch.conf`; sources are typically `files`, `dns`, `nis`, etc.

DfilesCorrect

The `files` keyword in the `hosts:` line of `/etc/nsswitch.conf` indicates that the system should consult local static files, specifically `/etc/hosts`, for hostname resolution, often as the first source checked.

Ehosts

`hosts` is the database entry itself (e.g., `hosts: files dns`), not a source keyword within that entry.

Concept tested: /etc/nsswitch.conf keywords for host resolution

Topics

#nsswitch.conf#hostname lookups#DNS#files

Community Discussion

No community discussion yet for this question.

Full LX0-104 Practice