Show listening ports

Show listening TCP ports with PID and process name. The modern replacement for netstat.

ss -tlnp

tool
linux133 commands
tags
linuxnetwork

More linux commands

  • ss -tlnp | grep :<port>

    Show which process is listening on a given port.

  • ps aux --sort=-%cpu | head -15

    Sort processes by CPU usage and show the first 15 lines.

  • ps aux --sort=-%mem | head -15

    Sort processes by memory usage and show the first 15 lines.

  • journalctl -u <service> -f --since '10 minutes ago'

    Show the last 10 minutes of a unit's logs and keep printing new lines.

  • systemctl status <service> --no-pager -l

    Show the service state, main PID and recent log lines without cutting long lines.

all 133 linux commands