The ss command

another utility to investigate sockets 4 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.

Options in the examples

-l, --listening
Display only listening sockets (these are omitted by default).
-n, --numeric
Do not try to resolve service names. Show exact bandwidth values, instead of human-readable.
-p, --processes
Show process using socket.
-t, --tcp
Display TCP sockets.
-u, --udp
Display UDP sockets.

Examples

ss -tlnp

TCP listening ports with process

ss -tulnp

TCP+UDP listening

sudo ss -tlnp | grep :80
sudo ss -tlnp

Which program listens on which port?

Lessons that use ss

Related commands