LPIC-1 Exam 102 v5 (Linux Administrator) — Question 35
Which of the following commands can identify the PID od a process which opened a TCP port?
Answer options
- A. ptrace
- B. strace
- C. debug
- D. lsof
- E. nessus
Correct answer: D
Explanation
The correct answer is D, lsof, which lists open files and can display processes using TCP ports along with their PIDs. Options A (ptrace) and B (strace) are used for debugging and tracing processes, but do not directly identify open ports. Option C (debug) is not a specific command for this purpose, and E (nessus) is a vulnerability scanner that does not provide PID information for open TCP ports.