I'm on Ubuntu 20.04 and the netstat -an command doesn't exist. I can install it sudo apt install net-tools but wanted to know what the modern day command is for this command.
The nestat -an command lists all of the ports that are being used on the system (TCP, IP, Unix Domain Sockets). The -n says to display the port as a number.
I did a search and found:
alternative to "netstat -s" -which was good, but did not include an answer for netatat -a.
Another answer suggested ss but didn't provide any reason. This might be the answer.