LFCS · Question #450
Which of these are name resolution related files? (Choose Two)
The correct answer is A. /etc/hosts B. /etc/nsswitch.conf. /etc/hosts provides static hostname-to-IP mappings, and /etc/nsswitch.conf dictates the lookup order for various naming services, both critical for name resolution.
Question
Options
- A/etc/hosts
- B/etc/nsswitch.conf
- C/etc/lmhosts
- D/etc/man
- E/etc/dns.conf
How the community answered
(35 responses)- A94% (33)
- D3% (1)
- E3% (1)
Why each option
`/etc/hosts` provides static hostname-to-IP mappings, and `/etc/nsswitch.conf` dictates the lookup order for various naming services, both critical for name resolution.
The `/etc/hosts` file is a local plain-text file that maps hostnames to IP addresses, providing a static name resolution mechanism before DNS queries.
The `/etc/nsswitch.conf` file determines the order and sources (e.g., files, DNS, NIS) that the system uses to look up various types of information, including hostnames, making it central to name resolution configuration.
`/etc/lmhosts` is primarily used for NetBIOS name resolution on Windows or Samba systems, not the primary mechanism for general hostname resolution on Linux.
`/etc/man` is typically a directory containing configuration files for the `man` command (manual pages), unrelated to name resolution.
`/etc/dns.conf` is not a standard configuration file for DNS resolution on Linux; `/etc/resolv.conf` is the standard file for specifying DNS servers.
Concept tested: Linux name resolution files
Source: https://man7.org/linux/man-pages/man5/hosts.5.html
Topics
Community Discussion
No community discussion yet for this question.