工具 / 用途 / 一行示例
| 工具 | 用途 | 示例 |
|---|---|---|
| ip / ifconfig | 接口与地址 | ip -br a |
| ethtool | 链路层速率与统计 | ethtool -S eth0 |
| ping / arping | 三层 / 二层连通 | arping -c2 -I eth0 10.0.0.1 |
| traceroute / mtr | 路径与逐跳质量 | mtr -r -c 50 8.8.8.8 |
| dig / nslookup | DNS 解析 | dig +trace example.com |
| ss / netstat | 端口与连接 | ss -tulnp |
| nc / telnet | 端口连通测试 | nc -zv 10.0.0.5 443 |
| curl | 应用层诊断 | curl -v --connect-timeout 3 https://x/ |
| tcpdump / tshark | 抓包与协议分析 | tcpdump -i any -nn port 80 |
| nmap | 端口与主机存活扫描 | nmap -Pn -sT -p 1-1024 10.0.0.5 |
| iperf3 | 带宽与质量测试 | iperf3 -c 10.0.0.9 -t 20 |
| conntrack | 连接跟踪表排查 | conntrack -S |
Debian/Ubuntu 一把装齐
Debian/Ubuntu 一把装齐
sudo apt update && sudo apt install -y iproute2 iputils-ping iputils-arping traceroute mtr-tiny dnsutils netcat-openbsd curl tcpdump tshark nmap iperf3 conntrackRHEL/CentOS/Rocky 一把装齐
RHEL/CentOS/Rocky 一把装齐
sudo dnf install -y iproute iputils arping traceroute mtr bind-utils nmap-ncat curl tcpdump wireshark-cli nmap iperf3 conntrack-tools最小化系统经常缺 dig/tcpdump/nc,到达现场前先确认;Windows 侧对应工具见「Windows 与 Linux 排障命令对照」。