ホスト検索で/ etc / hostsファイルを参照するためには、Name Service Switch構成ファイルのhostsオプションにどのキーワードをリストする必要がありますか。
正解:
files
Explanation:
The keyword files must be listed in the hosts option of the Name Service Switch configuration file in order to make host lookups consult the /etc/hosts file. The files service specifies that the local files, such as /etc/hosts, should be used as a source of information. The order of the services on the line determines the order in which those services will be queried, in turn, until a result is found. For example, if the hosts option is set to:
hosts: files dns
then the /etc/hosts file will be searched first, and if no match is found, the DNS server will be queried next. If the hosts option is set to:
hosts: dns files
then the DNS server will be queried first, and if no match is found, the /etc/hosts file will be searched next. Reference:
LPI 102-500 Exam Objectives, Topic 110: Network Fundamentals, Weight: 4, 110.3 Basic network troubleshooting LPI 102-500 Study Guide, Chapter 10: Network Fundamentals, Section 10.3: Basic Network Troubleshooting, Page 125-126 nsswitch.conf: Name Service Switch configuration file