Back to practice tasks

practice task

Find Which Process Owns a Port

Port 8080 is already in use and a new service will not start. You need to identify the listener before killing or reconfiguring anything.

Independent study support only. No affiliation, endorsement, exam dumps, or guaranteed exam results.

Try first

sudo ss -ltnp 'sport = :8080'

Goal

Show the process name, PID, address, and port for the active listener.

Expected output

A listening socket row that includes Local Address:Port and process information such as users:(('node',pid=1234,fd=18)).

Teaches

A port conflict is a socket ownership problem. Identify the listener before changing service ports or stopping processes.

Common mistake

Killing the first process that looks related without proving it owns the exact listening socket.

command set

Commands to know

  1. ss -ltnp
  2. sudo ss -ltnp 'sport = :8080'
  3. lsof -iTCP:8080 -sTCP:LISTEN

Watch this command run

Example output from a temporary Linux lab

next practice

Separate DNS Failure From Server Failure

Users say a site is down, but the server may still be answering. You need to compare public DNS with a forced request to the expected IP.