mirror of
https://github.com/Fechin/reference.git
synced 2026-11-21 05:24:10 +03:00
Add netstat cheatsheet
This commit is contained in:
1 parent
9d60ec4746
commit
5b582283fb
1 file changed
+79
+79
@@ -0,0 +1,79 @@
|
||||
---
|
||||
title: Netstat
|
||||
icon: icon-netstat
|
||||
background: bg-gray-800
|
||||
tags:
|
||||
categories:
|
||||
- Linux Command
|
||||
date: 2021-01-27 11:44:21
|
||||
intro: |
|
||||
This quick reference cheat sheet provides various for using netstat command.
|
||||
---
|
||||
|
||||
Getting started {.cols-3}
|
||||
---------------
|
||||
|
||||
|
||||
### Statistics
|
||||
|
||||
All connections on port 80
|
||||
```shell script
|
||||
$ netstat -anp | grep :80
|
||||
```
|
||||
Netstat Help
|
||||
```shell script
|
||||
$ netstat -h
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Listening
|
||||
| Option | Example |
|
||||
|-----------------|------------------------------------------------|
|
||||
| `netstat -ltunp` | All Listening ports |
|
||||
| `netstat -ltn` | Listening TCP ports |
|
||||
| `netstat -lun` | Listening UDP ports |
|
||||
| `netstat -lx` | Listening Unix ports |
|
||||
|
||||
|
||||
|
||||
|
||||
### Connections
|
||||
|
||||
| Option | Example |
|
||||
|-----------------|------------------------------------------------|
|
||||
| `netstat -a` | All connections |
|
||||
| `netstat -at` | All TCP connections |
|
||||
| `netstat -au` | All UDP connections |
|
||||
|
||||
|
||||
|
||||
|
||||
### Statistics
|
||||
|
||||
| Option | Example |
|
||||
|-----------------|------------------------------------------------|
|
||||
| `netstat -s` | Display statistics |
|
||||
| `netstat -st` | Display TCP statistics |
|
||||
| `netstat -su` | Display UDP statistics |
|
||||
|
||||
|
||||
|
||||
|
||||
### Networks
|
||||
|
||||
| Option | Example |
|
||||
|-----------------|------------------------------------------------|
|
||||
| `netstat -i` | Show network interfaces |
|
||||
| `netstat -ie` | Show network interfaces extended info |
|
||||
|
||||
|
||||
|
||||
### Routing
|
||||
|
||||
| Option | Example |
|
||||
|-----------------|------------------------------------------------|
|
||||
| `netstat -r` | Show routing table |
|
||||
| `netstat -rn` | Show routing table, don't resolve hosts |
|
||||
|
||||
|
||||
Reference in new issue
Block a user