Which command shows all UDP sockets and the programs that are using them?

Study for the OSCP Linux Exam. Use our flashcards and multiple-choice questions to test your skills. Each query comes with detailed hints and explanations to enhance your preparedness. Get ready to conquer the exam!

Multiple Choice

Which command shows all UDP sockets and the programs that are using them?

Explanation:
To see UDP sockets and the programs using them, you want a command that lists sockets, filters for UDP, and shows the owning process. The right choice is a command that combines all three: -a to show all sockets, -u to filter for UDP, and -p to reveal the owning program (name and PID). That combination gives you every UDP socket along with exactly which program is using it. Other options miss one or more of those parts. A UDP-only display from the first option shows sockets but not which program owns them unless you add the process flag, and the TCP-focused option targets TCP sockets, not UDP. The remaining choice can show UDP sockets and processes, but it’s not as direct or may require extra filtering. netstat -aup cleanly provides the complete view in one go.

To see UDP sockets and the programs using them, you want a command that lists sockets, filters for UDP, and shows the owning process. The right choice is a command that combines all three: -a to show all sockets, -u to filter for UDP, and -p to reveal the owning program (name and PID). That combination gives you every UDP socket along with exactly which program is using it.

Other options miss one or more of those parts. A UDP-only display from the first option shows sockets but not which program owns them unless you add the process flag, and the TCP-focused option targets TCP sockets, not UDP. The remaining choice can show UDP sockets and processes, but it’s not as direct or may require extra filtering. netstat -aup cleanly provides the complete view in one go.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy