首先安裝 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 下應該區別不大。