What is the alternative to command netstat -ntpl on Debian 9?
I am using this command to check what program is listening on port.
Alternatively with parameters -ntupl (with u) including UDP.
2 Answers
netstat (with both options) works fine on Debian 9. If it is not installed, it is in the package net-tools.
There is also the ss command (dumps socket statistics) from the package iproute2. The option you have given, seem all to be the same: ss -nptl, etc.. The output format is a bit different, though.
Simply use ss -a4n for listening all ipv4 port (listening or not) and not resolve the port number (show the number, not the service)