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.
Question
Options
- Aorder hosts,bind
- B192.168.168.4 dns-server
- Chosts: files,dns
- Ddomain mycompany.com
How the community answered
(37 responses)- A3% (1)
- C3% (1)
- D95% (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.
`order hosts,bind` is a directive found in `/etc/host.conf`, not `/etc/resolv.conf`.
An IP address followed by a hostname (like `192.168.168.4 dns-server`) is typically found in `/etc/hosts`, not `/etc/resolv.conf`.
`hosts: files,dns` is a directive found in `/etc/nsswitch.conf`, which determines the lookup order for hostnames, not in `/etc/resolv.conf`.
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
Community Discussion
No community discussion yet for this question.