Multiple choice linux

Which file does Linux use to resolve hostnames?

  1. /etc/hostname.conf

  2. /etc/dns.conf

  3. /etc/host.conf

  4. /etc/resolve.conf

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The /etc/host.conf file controls how Linux resolves hostnames, including the order of resolver methods (like /etc/hosts, DNS, NIS). While /etc/hosts contains hostname mappings, host.conf configures the resolution behavior itself.

AI explanation

To answer this question, you need to understand how Linux resolves hostnames.

Linux uses the /etc/host.conf file to resolve hostnames. This file contains the configuration settings for the hostname resolution process.

Let's go through each option to understand why it is correct or incorrect:

Option A) /etc/hostname.conf - This option is incorrect because Linux does not use the /etc/hostname.conf file to resolve hostnames.

Option B) /etc/dns.conf - This option is incorrect because Linux does not use the /etc/dns.conf file to resolve hostnames.

Option C) /etc/host.conf - This option is correct. Linux uses the /etc/host.conf file to resolve hostnames. This file contains the configuration settings for the hostname resolution process.

Option D) /etc/resolve.conf - This option is incorrect. While the /etc/resolve.conf file exists in Linux systems, it is used to configure the DNS (Domain Name System) resolver, not for hostname resolution.

The correct answer is C) /etc/host.conf. This option is correct because Linux uses the /etc/host.conf file to resolve hostnames.