Multiple choice technology

Why do you use hosts.txt file on any system?

  1. Bypass the local DNS server

  2. Host a website on your system

  3. Set the IP address for localhost

  4. No such file exists on the systemNo such file exists on the system

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

The hosts.txt file (on Unix/Linux at /etc/hosts, on Windows at C:\Windows\System32\drivers\etc\hosts) maps hostnames to IP addresses. It's checked before DNS queries, allowing you to bypass DNS for specific entries. It commonly sets 127.0.0.1 to 'localhost' for local loopback resolution. It does not host websites nor is it nonexistent.