210-255 · Question #156
Which command can be used to find open ports on a system?
The correct answer is A. netstat -I. The netstat command with the listening flag (-l, which may render as -I in some fonts) displays open listening ports on a system.
Question
Which command can be used to find open ports on a system?
Options
- Anetstat -I
- Bnetstat -v
- Cnetstat -r
- Dnetstat-g
How the community answered
(20 responses)- A90% (18)
- C5% (1)
- D5% (1)
Why each option
The netstat command with the listening flag (-l, which may render as -I in some fonts) displays open listening ports on a system.
The netstat -l flag (listening) displays all sockets currently in a listening state, which directly identifies open ports waiting for incoming connections. This flag is the standard way to enumerate open ports using netstat on Linux and Unix-based systems, making it the correct answer for port enumeration.
netstat -v enables verbose output mode, providing additional detail on existing connections rather than specifically listing listening or open ports.
netstat -r displays the kernel IP routing table, showing network routes and gateways rather than open port information.
netstat -g displays IPv4 and IPv6 multicast group membership information, which is unrelated to identifying open ports on a system.
Concept tested: netstat command flags for open port enumeration
Source: https://man7.org/linux/man-pages/man8/netstat.8.html
Topics
Community Discussion
No community discussion yet for this question.