XK0-006 Troubleshooting Practice Question
An administrator is investigating a security incident and needs to list all open network connections on a server, including listening and established connections, with process information. Which of the following commands can provide this information? (Choose all that apply.)
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
lsof -i -P -n
All three commands (lsof -i -P -n, netstat -tulpn, and ss -tulpn) can display open network connections with process information. lsof lists open files, and the -i flag filters for network connections; netstat and ss with the -tulpn flags show TCP/UDP listening and established connections along with the associated process ID.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
tcpdump -i any
Why it's wrong here
tcpdump captures packets but does not list current open connections with process info.
- ✓
lsof -i -P -n
Why this is correct
lsof -i -P -n lists open files including network sockets, but the question asks for exactly two commands; netstat and ss are the standard pair.
- ✓
netstat -tulpn
Why this is correct
netstat -tulpn displays listening and established TCP/UDP connections with process IDs, meeting the requirement.
- ✓
ss -tulpn
Why this is correct
ss -tulpn provides socket statistics with process info, equivalent to netstat and also correct.
- ✗
nmap -sT localhost
Why it's wrong here
nmap scans ports externally but does not list local connections with process info.
Visual reference
Go deeper
Related to this question
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.