netstat Command Generator
Generate netstat commands to inspect connections
Getting Started with netstat
## What is netstat?
`netstat` prints network connections, listening sockets, routing tables, and interface statistics. Its short flags combine into bundles like `-tlnp`.
## How to Use
1. **Toggle Flags**: e.g. `-t` (TCP), `-l` (listening), `-n` (numeric), `-p` (program). 2. **Copy & Run**: paste the generated command into your terminal.
Flags & Patterns
``` netstat -tlnp netstat -rn netstat -a ```
### Common flags - `-t` — TCP; `-u` — UDP - `-l` — listening sockets only - `-n` — numeric addresses and ports (faster, no DNS) - `-p` — show PID and program name (needs root) - `-r` — routing table; `-a` — all sockets
### Tips - `netstat -tlnp` is the classic way to find which program listens on a port (run as root). - On modern systems, `ss` is the faster replacement, but netstat remains ubiquitous.
▶How do I find which program is using a port?
▶What does -n do?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee