首先安装 wireshark.
sudo apt-get install wireshark
在 windows 下,还需要安装 winpcap。 在linux 下,就不需要了。我们可以从这里找到一点参考。
Linux
On Linux, you need to have "packet socket" support enabled in your kernel. Your distribution might enable this by default in the kernel; most recent versions of distributions do so. If it does not, see the "Packet socket" item in the Linux "Configure.help" file.
然后应该就可以用 wireshark 抓包了。但是请注意,你的wireshark应该在以 root 身份运行。那就这样吧。sudo wireshark
好了,这样应该可以看到这样的界面。然后其他的和 windows 下应该区别不大。