首页/网络/网络排障速查/Windows 与 Linux 排障命令对照表
本包目录(235 条)
排查流程与方法36 条
连通性与链路检测54 条DNS 与解析排查46 条端口与连接检查37 条抓包与流量分析32 条应用层慢与丢包定位30 条

Windows 与 Linux 排障命令对照表

双平台运维必备:同一个排障动作在两边的命令完全不同;本表覆盖连通、路由、DNS、端口、防火墙、抓包六类动作的对照。

网络排障速查网络更新于 2026-10-12

动作 / Windows / Linux

动作WindowsLinux
接口与地址ipconfig /allip -br a / ifconfig
路由表route print / Get-NetRouteip route
连通测试ping -t / Test-Connectionping -c
路径追踪tracert / pathpingtraceroute / mtr
DNS 查询nslookup / Resolve-DnsNamedig / host
DNS 缓存ipconfig /flushdnsresolvectl flush-caches
端口连接netstat -anoss -tanp / netstat -tanp
端口测试Test-NetConnection -Portnc -zv
ARP 表arp -aip neigh / arp -a
防火墙netsh advfirewall / Get-NetFirewallRuleiptables / nft / firewalld / ufw
抓包pktmon / netsh tracetcpdump / tshark
网卡统计Get-NetAdapterStatisticsip -s link / ethtool -S

Windows 侧快速打点

Windows 侧快速打点
ipconfig /all; route print -4
test-connection 8.8.8.8; test-netconnection 10.0.0.5 -port 443
resolve-dnsname www.example.com -server 8.8.8.8
Windows 10/11 与 Server 2019+ 自带 curl.exe 与 Test-NetConnection,排障时不必找第三方工具。

易错点

  • Windows ping 默认只发 4 个且无间隔参数 -i,长测要用 -t 或 powershell 循环
  • Linux 上 netstat 已被 ss 取代(net-tools 退役),新系统可能未安装 netstat

数据来源与参考

  • Microsoft Learn:NetTCPIP 模块与网络命令
  • iptables / iproute2 手册

相关工具

​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌