010-100 · Question #35
Which files will affect the domain name resolution system on Linux? (Choose TWO answers)
The correct answer is C. /etc/hosts E. /etc/resolv.conf. Linux name resolution relies on /etc/hosts for static hostname-to-IP mappings and /etc/resolv.conf for DNS server configuration.
Question
Which files will affect the domain name resolution system on Linux? (Choose TWO answers)
Options
- A/etc/hostname
- B/etc/nameserver
- C/etc/hosts
- D/etc/which
- E/etc/resolv.conf
How the community answered
(30 responses)- A3% (1)
- B7% (2)
- C80% (24)
- D10% (3)
Why each option
Linux name resolution relies on /etc/hosts for static hostname-to-IP mappings and /etc/resolv.conf for DNS server configuration.
The /etc/hostname file stores only the local machine's own hostname for identification purposes and has no effect on how the system resolves names for remote hosts.
The file /etc/nameserver does not exist as a standard Linux configuration file; nameserver addresses are specified as 'nameserver' directives inside /etc/resolv.conf, not in a separate file.
The /etc/hosts file is a static local lookup table that maps hostnames to IP addresses and is queried by the system resolver before any DNS server is contacted, directly influencing domain name resolution.
The file /etc/which does not exist on Linux systems and plays no role in name resolution or any other standard system function.
The /etc/resolv.conf file defines the IP addresses of DNS nameservers and optional search domain suffixes used by the resolver library, making it the primary configuration file for all DNS-based name resolution on the system.
Concept tested: Linux DNS and hostname resolution configuration files
Source: https://man7.org/linux/man-pages/man5/resolv.conf.5.html
Topics
Community Discussion
No community discussion yet for this question.