Check Network Status in Linux
Publish date: Oct 22, 2019
Socket Statistics - ss
Now that netstat - the former Linux network inspection application - has been deprecated, We need to learn how to use the replacement. The main option is ss and it’s faster and better than netstat.
Options
See below the most useful command options and examples.
All Sockets
ss
Here I see more than 1,000 entries. Not useful at all, but everything is there.
Listening Sockets
ss -l
At least in my case it still look awful. A lot of junk I don’t need is sent to the standard output.
Listening by protocol
Unix: -x TCP: -t UDP: -u
ss -t
Nice, now I see what really matters. But there’s a catch. By default ss -t | -u | -x will only show the connections that are established. If you want to see also the connections that are listening, use the option -a.
ss -at
or even better, if you want only the listening connections:
ss -lt