lsof with -iTCP -sTCP:LISTEN shows every open listening socket and the owning process; -P disables port-name lookups and -n disables hostname lookups for speed and accuracy. The output maps each open port to its process — the definitive answer to 'what is running on port X'. Compare with ss -tlnp, which shows the same picture differently.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.