CompTIA Linux+ (XK0-005) — Question 161
A systems administrator is compiling a report containing information about processes that are listening on the network ports of a Linux server. Which of the following commands will allow the administrator to obtain the needed information?
Answer options
- A. ss -plnt
- B. tcpdump -nL
- C. netstat -pn
- D. lsof -lt
Correct answer: A
Explanation
The command 'ss -plnt' is specifically designed to display information about sockets, including the processes that are listening on network ports, making it the correct choice. While 'netstat -pn' also provides information about network connections, it is less efficient than 'ss'. 'tcpdump -nL' is used for capturing network traffic and does not provide process details, and 'lsof -lt' lists open files but does not focus on network listening processes.