Files
tldr/pages.zh/windows/netstat.md

36 lines
872 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# netstat
> 显示活动的 TCP 连接、计算机正在监听的端口、网络适配器统计信息、IP 路由表、IPv4 统计信息和 IPv6 统计信息。
> 更多信息:<https://learn.microsoft.com/windows-server/administration/windows-commands/netstat>。
- 显示活动的 TCP 连接:
`netstat`
- 显示所有活动的 TCP 连接以及计算机正在监听的 TCP 和 UDP 端口:
`netstat -a`
- 显示网络适配器统计信息,例如发送和接收的字节和数据包数量:
`netstat -e`
- 显示活动的 TCP 连接,并以数字方式表示地址和端口号:
`netstat -n`
- 显示活动的 TCP 连接,并为每个连接包括进程 ID (PID)
`netstat -o`
- 显示 IP 路由表的内容:
`netstat -r`
- 按协议显示统计信息:
`netstat -s`
- 显示当前打开的端口及相关的 IP 地址列表:
`netstat -an`