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.
Question
Options
- Aresolv
- Bdns
- Cremote
- Dfiles
- Ehosts
How the community answered
(33 responses)- A3% (1)
- B94% (31)
- C3% (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.
`resolv` is not a keyword used in `/etc/nsswitch.conf` to specify a source for host lookups; the relevant keyword for DNS is `dns`.
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`.
`remote` is not a standard keyword for specifying a hostname lookup source in `/etc/nsswitch.conf`; sources are typically `files`, `dns`, `nis`, etc.
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.
`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
Community Discussion
No community discussion yet for this question.