OnCallReady

Commands

ss - another utility to investigate sockets

ss [-t] [-u] [-l] [-n] [-p]

Options you will use

-t / -u
TCP / UDP.
-l
Listening sockets only.
-n
Numeric: do not resolve names or ports.
-p
Show the owning process (needs root).
-H, --no-header
Do not print the header line (good before wc -l).
-e, --extended
Show detailed socket information: uid, inode, cookie.
-o, --options
Show timer information (retransmit, keepalive, time-wait countdown).
-s, --summary
Print summary statistics: how many sockets per state and protocol.
-t, --tcp
TCP sockets.
-u, --udp
UDP sockets.
-a, --all
Listening and non-listening sockets (all states).
-n, --numeric
Do not resolve service names: show :443, not :https.
-l, --listening
Only listening sockets.
-p, --processes
Show the process using the socket (needs root for other users' processes).

Examples

$ sudo ss -tlnp

everything listening, with its process - the netstat replacement

Taught in

Try ss in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.