Linux_FoundationLinux_Foundation
LFCS · Question #471
LFCS Question #471: Real Exam Question with Answer & Explanation
The correct answer is B: 192.168.168.4 dns-server. /etc/hosts maps IP addresses to hostnames, locally resolving names without DNS queries.
Submitted by yuriko_h· Apr 18, 2026Networking
Question
Which of the following lines would you find in the file /etc/hosts?
Options
- Aorder hosts, bind
- B192.168.168.4 dns-server
- Chosts: files,dns
- Ddomain mycompany.com
Explanation
/etc/hosts maps IP addresses to hostnames, locally resolving names without DNS queries.
Common mistakes.
- A. This line specifies the order of name resolution services, typically found in /etc/nsswitch.conf.
- C. This entry specifies the name service lookup order for hosts, found in /etc/nsswitch.conf, not /etc/hosts.
- D. The 'domain' directive is used in /etc/resolv.conf to specify the local domain name for DNS lookups.
Concept tested. Linux /etc/hosts file format and function
Reference. https://learn.microsoft.com/en-us/previous-versions/tn-archive/aa997530(v=technet.10)#etc-hosts
Topics
#etc/hosts#Hostname Resolution#Network Configuration
Community Discussion
No community discussion yet for this question.