LX0-104 · Question #275
Which of the following lines would an administrator find in the file /etc/nsswitch.conf?
The correct answer is C. hosts: files dns. The /etc/nsswitch.conf file contains directives that define the lookup order for various system information, such as hosts: files dns.
Question
Options
- Aorder hosts,bind
- B192.168.168.4 dns-server
- Chosts: files dns
- Ddomain mycompany.com
How the community answered
(44 responses)- A2% (1)
- B2% (1)
- C89% (39)
- D7% (3)
Why each option
The `/etc/nsswitch.conf` file contains directives that define the lookup order for various system information, such as `hosts: files dns`.
`order hosts,bind` is a directive found in older `resolv.conf` or similar files for specifying resolver order, not in `nsswitch.conf`.
`192.168.168.4 dns-server` is an entry typically found in `/etc/hosts` to map an IP address to a hostname, not a directive for `nsswitch.conf`.
The `/etc/nsswitch.conf` file configures the order in which Name Service Switch services search for information. The line `hosts: files dns` is a common entry specifying that hostname lookups should first consult `/etc/hosts` (`files`) and then use DNS servers.
`domain mycompany.com` is a directive typically found in `/etc/resolv.conf` to specify the default domain for hostname resolution, not a configuration line for `nsswitch.conf`.
Concept tested: Name Service Switch (nsswitch.conf) configuration
Source: https://man7.org/linux/man-pages/man5/nsswitch.conf.5.html
Topics
Community Discussion
No community discussion yet for this question.