↑ ↓ select, Enter open, Esc close

List open ports and listening services

root@server
ss -tulpn

Shows all listening TCP and UDP sockets with local address, port and the associated process including PID. The local address column reveals whether a service is only reachable internally (127.0.0.1) or on all interfaces (0.0.0.0, *, [::]). ss is the modern replacement for netstat.

Note: Without root, the process details for services of other users are missing.

Also searched as

  • which process is listening on port
  • list open ports linux
  • netstat -tulpn replacement

Related one-liners

All in Network

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.