tldr/pages/common/netstat.md

33 lines
649 B
Markdown
Raw Normal View History

2014-09-11 11:38:56 +01:00
# netstat
> Display network-related information such as open connections, open socket ports, etc.
> More information: <https://man7.org/linux/man-pages/man8/netstat.8.html>.
2014-09-11 11:38:56 +01:00
- List all ports:
2014-09-11 11:38:56 +01:00
`netstat --all`
2014-09-11 11:38:56 +01:00
- List all listening ports:
2014-09-11 11:38:56 +01:00
`netstat --listening`
2014-09-11 11:38:56 +01:00
- List listening TCP ports:
2014-09-11 11:38:56 +01:00
`netstat --tcp`
2014-09-11 11:38:56 +01:00
- Display PID and program names:
2014-09-11 11:38:56 +01:00
`netstat --program`
2014-09-11 11:38:56 +01:00
- List information continuously:
2014-09-11 11:38:56 +01:00
`netstat --continuous`
2016-01-14 13:52:25 +00:00
- List routes and do not resolve IP addresses to hostnames:
2016-01-14 13:52:25 +00:00
`netstat --route --numeric`
- List listening TCP and UDP ports (+ user and process if you're root):
`netstat --listening --program --numeric --tcp --udp --extend`