Ace your COMPTIA A+ certification with our practice exam. Engage with a variety of questions including multiple choice and performance-based, complete with hints and detailed explanations. Prepare effectively and boost your confidence for the big day!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What is the use of the HOSTS file?

  1. Resolves FQDNs into IP addresses

  2. Resolves NETBIOS names into IP addresses

  3. Stores environment variables

  4. Manages user profiles

The correct answer is: Resolves FQDNs into IP addresses

The HOSTS file is used to map fully qualified domain names (FQDNs) to IP addresses. This means that when a user attempts to access a domain, the operating system first checks the HOSTS file to find the corresponding IP address. If a match is found, it connects directly to that address without needing to query a DNS server. This can be particularly useful for overriding DNS resolutions, testing, or redirecting network traffic for specific domains. In contrast to other functions, such as resolving NETBIOS names—which involves a different process for handling local network names—the HOSTS file specifically deals with FQDNs, showcasing its primary role in name resolution and networking functionality.