How do you list listening ports and the processes that own them?
BeginnerConceptCommand-Line Tools & Diagnostics
Answer
ss -tulpn # TCP+UDP, listening, numeric, with process
ss -tlnp 'sport = :443'
lsof -iTCP:8080 -sTCP:LISTEN
ss replaced netstat and reads from netlink directly, so it is much faster on hosts with many sockets. Run it with sudo to see process names for other users.
More on Command-Line Tools & Diagnostics
How do you check if a remote port is open?BeginnerWhat does `ping` tell you and what does it not?BeginnerHow does traceroute work and how do you read the output?BeginnerWhat is mtr and why is it better than traceroute?IntermediateHow do you query DNS with dig and read the answer?BeginnerHow do you use curl to debug an HTTP problem?Beginner