How to see running IP Services on Linux with ss

Martin Döring, 2nd of April, 2022

When thinking about securing your server with firewall rules it may be interesting to find out which services are running at all on your system.

You can do this with the ss command. The following command shows you in the order of the options the running (-u) udp and (-t) tcp sockets, just for (-l) listening ports. It also lists the (-p) processes and does (-n) not use aliases, but port numbers for the shown ports.

ss -utlpn

You can then add rules to your packet filter to secure your system.

On other systems there may be the netstat command. On Manjaro Linux at least ss is preinstalled and netstat is not.

This page is part of my own personal documentation and is published in the hope that it may be also helpful for others.