mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-31 00:41:42 +00:00
38 lines
716 B
Plaintext
38 lines
716 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# netstat
|
|
|
|
> Display network-related information such as open connections, open socket ports, etc.
|
|
> More information: <https://manned.org/netstat>.
|
|
|
|
- List all ports:
|
|
|
|
`netstat --all`
|
|
|
|
- List all listening ports:
|
|
|
|
`netstat --listening`
|
|
|
|
- List listening TCP ports:
|
|
|
|
`netstat --tcp`
|
|
|
|
- Display PID and program names:
|
|
|
|
`netstat --program`
|
|
|
|
- List information continuously:
|
|
|
|
`netstat --continuous`
|
|
|
|
- List routes and do not resolve IP addresses to hostnames:
|
|
|
|
`netstat --route --numeric`
|
|
|
|
- List listening TCP and UDP ports (+ user and process if you're root):
|
|
|
|
`netstat --listening --program --numeric --tcp --udp --extend`
|