Under Linux, which command can show the ports currently being listened to by services?
1 Answer
The -p
option to netstat
and ss
will display the associated process of each socket.
sudo netstat -lptun
sudo ss -lp
You can also use lsof
:
sudo lsof -iTCP -sTCP:LISTEN