CompTIA CASP+ CAS-004 – Question018

A security analyst is reviewing network connectivity on a Linux workstation and examining the active TCP connections using the command line.
Which of the following commands would be the BEST to run to view only active Internet connections?

A.
sudo netstat -antu | grep "LISTEN" | awk `{print$5}'
B. sudo netstat -nlt -p | grep "ESTABLISHED"
C. sudo netstat -plntu | grep -v "Foreign Address"
D. sudo netstat -pnut -w | column -t -s $'w'
E. sudo netstat -pnut | grep -P ^tcp

Correct Answer: B

Explanation: