Common lsof commands for listing ports listening and in use on Linux.
lsof is a quick way to see what’s listening on a Linux box, and what process owns each connection, without needing netstat installed.
sudo lsof -i -P -n # List all listening and established connections, with numeric ports and hosts



