Introduction
The netstat
(Network Statistics) command is a powerful network utility available on Linux that provides a variety of network-related information. This tool is essential for network administrators and users who need to monitor and troubleshoot network connections.
Display Active Connections
netstat
Show Network Interfaces
netstat -i
Display Routing Table
netstat -r
Display Listening Ports
netstat -l
This command lists all listening ports. For a detailed view, including TCP and UDP ports, use:
netstat -ltu
Show Network Statistics
netstat -s
Find a Specific Port
netstat -an | grep <port_number>
Viewing Listening Services
netstat -tuln
This command lists all the listening services along with their respective ports in numeric form.
More examples how to use netstat
command you can find at the link.