Install Netstat On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora And Raspbian

Install Netstat On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora And Raspbian

netstat

Displays network-related information such as open connections, open socket ports, etc.

Maintainer: net-tools Team



Section: net

Install netstat

  • Debian apt-get install net-tools Click to copy
  • Ubuntu apt-get install net-tools Click to copy
  • Alpine OS apk add net-tools Click to copy
  • Arch Linux pacman -S net-tools Click to copy
  • Kali Linux apt-get install net-tools Click to copy
  • CentOS yum install net-tools Click to copy
  • Fedora dnf install net-tools Click to copy
  • Raspbian apt-get install net-tools Click to copy

Displays network-related information such as open connections, open socket ports, etc.

How to use netstat?

Below are few example commands for netstat that you can use in the terminal.

List all ports:
netstat -aClick to copy
List all listening ports:
netstat -lClick to copy
List listening TCP ports:
netstat -tClick to copy
Display PID and program names:
netstat -pClick to copy
List information continuously:
netstat -cClick to copy
List routes and do not resolve IP to hostname:
netstat -rnClick to copy
List listening TCP and UDP ports (+ user and process if you're root):
netstat -lepuntClick to copy
Print the routing table:
netstat -nrClick to copy
To install the latest version of netstat in your favorite operating system just copy the netstat installation command from above and paste it into terminal. It will download and install the latest version of netstat 2026 package in your OS.