FahamLah

Commands

ss -tln[p]

ss -tln[p]

Risk: Safe

What it does

Lists the ports that programs listen on.

When to use it

When a call is refused, or a port is already in use.

Example

$ ss -tln

TCP ports that listen, as numbers.

$ sudo ss -tlnp

Add the program behind each port. Needs root.

$ sudo ss -tlnp 'sport = :80'

Only port 80.