CompTIA Linux+ (XK0-004) — Question 1
A junior Linux administrator is updating local name resolution to support IPv6. The administrator issues the command cat /etc/hosts and receives the following output:
127.0.0.1 localhost
Which of the following actions should the administrator perform to accomplish this task?
Answer options
- A. Modify the /etc/hosts file, and add the ipv6 localhost entry to the file.
- B. Modify the /etc/hosts file, and add the ::1 localhost entry to the file.
- C. Modify the /etc/hosts file, and add the ipv4 localhost entry to the file.
- D. Modify the /etc/hosts file, and add the 0.0.0.0 localhost entry to the file.
Correct answer: B
Explanation
The correct answer is B because the ::1 address is the IPv6 loopback address equivalent to 127.0.0.1 in IPv4. Options A, C, and D are incorrect as they do not provide the correct IPv6 loopback address required for proper local name resolution in an IPv6 context.