A Linux technician suspects that a server has an unauthorized background process establishing outbound network sessions. The technician needs to view all active TCP connections along with the associated Process ID (PID) for each socket directly from the terminal. Which command should the technician execute?
- netstat -tupAnswer
- Bps aux
- Cifconfig -a
- Dtraceroute
Answer
The command 'netstat -tup' (or netstat -antp) displays active TCP network connections along with the associated Process ID (PID) and program name for each connection.
The command 'netstat -tup' correctly identifies open network sockets (TCP/UDP) and displays the associated Process ID (PID) and program name for each connection, allowing the technician to pin down unauthorized network activity to a specific running process.
Step-by-Step Solution
Key Concept
Linux/macOS Network Process and Socket Monitoring