Install Netstat On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora And Raspbian
Install netstat
-
Debian
apt-get install net-toolsClick to copy -
Ubuntu
apt-get install net-toolsClick to copy -
Alpine OS
apk add net-toolsClick to copy -
Arch Linux
pacman -S net-toolsClick to copy -
Kali Linux
apt-get install net-toolsClick to copy -
CentOS
yum install net-toolsClick to copy -
Fedora
dnf install net-toolsClick to copy -
Raspbian
apt-get install net-toolsClick 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 copyList all listening ports:netstat -lClick to copyList listening TCP ports:netstat -tClick to copyDisplay PID and program names:netstat -pClick to copyList information continuously:netstat -cClick to copyList routes and do not resolve IP to hostname:netstat -rnClick to copyList listening TCP and UDP ports (+ user and process if you're root):netstat -lepuntClick to copyPrint 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.




