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.1localhost Which of the following actions should the administrator perform to accomplish this task?
Click on the arrows to vote for the correct answer
A. B. C. D.B.
To update local name resolution to support IPv6, the junior Linux administrator needs to add the IPv6 localhost entry to the /etc/hosts file.
The /etc/hosts file is a simple text file that maps IP addresses to hostnames. It is used by the local name resolution mechanism to resolve hostnames to IP addresses without querying a DNS server.
In this case, the output of the cat /etc/hosts command shows that the /etc/hosts file contains only one entry:
127.0.0.1localhost
This entry maps the IP address 127.0.0.1 (which is the loopback address) to the hostname "localhost".
To add the IPv6 localhost entry to the /etc/hosts file, the administrator should use the following format:
::1localhost
This entry maps the IPv6 loopback address (::1) to the hostname "localhost".
Therefore, the correct answer is B. Modify the /etc/hosts file, and add the ::1 localhost entry to the file.
Option A is incorrect because it suggests adding an IPv6 address without specifying the loopback address.
Option C is incorrect because it suggests adding an IPv4 address, which is not relevant to the task of updating local name resolution to support IPv6.
Option D is incorrect because it suggests using the IP address 0.0.0.0, which is not a valid loopback address.