CompTIA Linux+ (XK0-004) — Question 258

A Linux administrator is developing a Bash script to close specific ports on a server firewall. The administrator is not certain of the default port for the Internet
Message Access Protocol.
Which of the following files should the administrator check to determine the default port?

Answer options

Correct answer: D

Explanation

The correct answer is D, as the /etc/services file contains mappings of service names to their corresponding port numbers, including the Internet Message Access Protocol. The other options do not contain this information; for example, /etc/network is related to network interfaces, /etc/default/ufw is for Uncomplicated Firewall settings, and /etc/resolv.conf is used for DNS resolution.