Which command would you use on Windows to view listening ports and current TCP connections?

Prepare for the eLearnSecurity Junior Penetration Tester exam with our comprehensive quiz platform. Improve your skills with multiple-choice questions, detailed explanations, and exam tips. Get exam ready with ease!

Multiple Choice

Which command would you use on Windows to view listening ports and current TCP connections?

Explanation:
To view listening ports and current TCP connections on Windows, use netstat with -ano. The -a option shows all sockets, including both listening ports and established connections; -n displays addresses and ports numerically so you get exact numbers without DNS lookups; -o adds the owning process ID for each socket, so you can identify which program is using a given port. This combination gives you a complete, actionable snapshot of network activity and which process is tied to each port. The other commands are Linux/Unix-oriented (different flag syntax and not Windows-native), so they wouldn’t be appropriate for this Windows task.

To view listening ports and current TCP connections on Windows, use netstat with -ano. The -a option shows all sockets, including both listening ports and established connections; -n displays addresses and ports numerically so you get exact numbers without DNS lookups; -o adds the owning process ID for each socket, so you can identify which program is using a given port. This combination gives you a complete, actionable snapshot of network activity and which process is tied to each port.

The other commands are Linux/Unix-oriented (different flag syntax and not Windows-native), so they wouldn’t be appropriate for this Windows task.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy