netstat # show active connectionsnetstat -l # show listening ports
netstat -ln # listening ports (no DNS)
netstat -lpn # listening + process infonetstat -t # TCP connections
netstat -u # UDP connections
netstat -tu # TCP + UDPnetstat -tulnp # all listening ports with processnetstat -an | grep ESTABLISHED # active established connectionsnetstat -tulnp | grep :80 # filter by portnetstat -tulnp | grep nginx # filter by processnetstat -r # routing tablenetstat -i # network interfacesnetstat -s # protocol statisticsnetstat -c # live monitoringnetstat is deprecated on most modern systems
Use:
ss -tulnp