CompTIA Linux+ Powered by LPI (LX0-104) — Question 40

Which of the following is a correct entry in the /etc/hosts file?

Answer options

Correct answer: D

Explanation

Option D is correct as it correctly maps the IP address 127.0.0.1 to the hostname localhost and its associated domain. The other options either misplace the order of the entries or use incorrect formatting, which does not conform to the typical structure required in the /etc/hosts file.