how to list the number ports opened on linux system?
-
portmap
-
top
-
netstat -nap
-
nmap -p
-
lsof -i -n -P
C,D,E
Correct answer
Explanation
netstat -nap shows all open ports with associated processes. nmap -p scans specified ports (or all if none specified). lsof -i -n -P lists network open files including ports. Options A and B are incorrect - portmap is a daemon, and top shows process CPU/memory info, not ports.