Linux socket lists help you see which services are listening and which endpoints an application is communicating with. This guide uses ss to inspect TCP, UDP and local Unix sockets without changing the network configuration.
Inspect TCP and UDP sockets
ss -tun-t selects TCP, -u selects UDP and -n displays numeric addresses and ports. Use -a to include listening and other sockets:
ss -tunaUDP does not have TCP-style established connection states.
Identify listening services
ss -ltn
ss -lunThe first lists listening TCP sockets; the second lists UDP listeners. To include owning processes where you have permission:
sudo ss -ltnupAdministrator access is useful for seeing other users’ process details, but it is not required for every socket listing.
Inspect local Unix sockets
ss -xanUnix sockets are local communication endpoints and are separate from internet TCP and UDP connections.
Interpret the results
Review the local address, remote address, state and process. An established connection alone does not reliably tell you whether the server originally initiated it; use the application and service context.
These commands show socket information, not live bandwidth consumption. On older systems with net-tools, the command is netstat, not netstats; ss is the usual current alternative.