← Networking
Linux · Networking

How to check listening ports in Linux

List listening TCP and UDP ports and the process owning each with ss -tulpn, the modern replacement for netstat.


See which ports are open for connections and which process owns each. ss is the modern tool; run it as root to see process names.

# Listening TCP + UDP ports with PID/program
sudo ss -tulpn

# TCP only
sudo ss -tlpn

# Is a specific port listening? (e.g. Oracle 1521)
sudo ss -tlpn | grep :1521

# All established connections
ss -tan state established
LinuxssPorts