Linux Commands / IT Support Guides
Find Linux listening sockets with ss
Check whether a local Linux service is listening on the TCP port you expect.
Environment and inputs: Linux · Bash-compatible shell; package and service names vary by distribution
Understand the problem
Run the command on the machine or inside the container where the service should be listening.
Run the command
The command uses -l for listening sockets, -n for numeric addresses and ports, -t for TCP and -p for process details when visible.
ss -lntp
Read the output
In Local Address:Port, 127.0.0.1:8080 means the socket listens on IPv4 loopback only. A value of 0.0.0.0:8080 means it listens on all local IPv4 interfaces.
Choose the next step
If the expected port is absent, check the service state and logs. If the port is present but remote users cannot connect, compare the listen address with the intended network path and access rules.
Before making changes
An account may see a socket without seeing the owning process. Follow local access policy before requesting more permissions or changing where the service listens.