Linux Commands Helper
💬 Your AI-powered Linux assistant
netstat Command - Network Statistics
The netstat command is used to display network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. It is a useful tool for network troubleshooting and monitoring.
Syntax
netstat [options]
Examples
netstat -tuln
Show all listening ports (TCP and UDP) with numeric addresses.
netstat -anp
Display all connections and listening ports with process IDs.
netstat -r
Show the kernel routing table.
netstat -i
Display a table of all network interfaces.
Notes
- Some options may require root privileges to display all information.
- On modern Linux systems,
ssis recommended as a replacement fornetstat. net-toolspackage may need to be installed to usenetstaton some distributions.
