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, ss is recommended as a replacement for netstat.
  • net-tools package may need to be installed to use netstat on some distributions.

© 2025 Linux Commands Helper. All rights reserved.

This project is under construction. Feedback and contributions are welcome.

Fazier badgeFeatured on Startup Fame