Last Updated on November 17, 2023 by InfraExam
What netstat command would best allow an administrator to determine the service responsible for a listening socket?
sudo netstat -tn
sudo netstat -lnp
netstat -tn
netstat lnp
Explanation & Hint:
The netstat command that would best allow an administrator to determine the service responsible for a listening socket, including the associated process, is:
sudo netstat -lnp
The -l flag shows listening sockets, the -n flag displays numerical addresses and ports, and the -p flag shows the associated process and its process ID (PID). By running this command with superuser privileges (sudo ), you can see the service responsible for each listening socket, as well as the process associated with it. |
For more Questions and Answers: