Home / Networking Commands / netstat (Linux)

netstat

Network Statistics - Linux Networking Tool

What Does It Do?

The netstat command displays network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. It's an essential tool for monitoring and troubleshooting network activity.

On Linux, netstat provides detailed information about active TCP/UDP connections, listening ports, and network interface statistics.

Advertisement

[ Insert Google AdSense Banner Code Here ]

When Should I Use It?

View Active Connections

See all active TCP and UDP network connections.

Check Listening Ports

Identify which ports are open and listening for connections.

Monitor Network Statistics

View interface statistics and packet counts.

View Routing Table

Display the kernel routing table information.

Common Commands

netstat -tuln

Show all TCP/UDP listening ports with numeric addresses.

netstat -a

Display all active connections and listening ports.

netstat -r

Display the routing table.

netstat -i

Show network interface statistics.

netstat -s

Display statistics for each protocol.

netstat --help

Display help information.

Try It Yourself

Practice using the netstat command in the terminal below. Try typing netstat -tuln or netstat -a