温馨提示×

dumpcap能在debian用吗

小樊
46
2026-09-03 15:17:06
栏目: 智能运维

可以,dumpcap 能在 Debian 上使用

基本情况

  • dumpcapWireshark 自带的抓包工具(用于捕获网络数据包)
  • 在 Debian 中通过安装 wireshark-commonwireshark 包即可获得

安装方式

sudo apt update
sudo apt install wireshark-common

或安装完整 Wireshark:

sudo apt install wireshark

权限问题(重要)

dumpcap 需要访问网络接口,通常有两种方式:

  1. 用 root 运行(简单但不推荐)
sudo dumpcap
  1. 配置普通用户抓包(推荐) Debian 安装 wireshark-common 时会提示是否允许非 root 用户抓包,选 yes 即可:
sudo dpkg-reconfigure wireshark-common
sudo usermod -aG wireshark $USER

然后重新登录或重启。

验证

dumpcap -D

能列出网卡就说明可用。

一句话总结

✅ Debian 完全支持 dumpcap,装 wireshark-common 就能用,注意用户权限即可。

0