1. 程式人生 > 其它 >ubuntu-wireshark打開出現錯誤的問題

ubuntu-wireshark打開出現錯誤的問題

The capture session could not be initiated on interface 'enp2s0' (You don't have permission to capture on that device).

Please check to make sure you have sufficient permissions.

On Debian and Debian derivatives such as Ubuntu, if you have installed Wireshark from a package, try running

    sudo dpkg
-reconfigure wireshark-common selecting "<Yes>" in response to the question Should non-superusers be able to capture packets? adding yourself to the "wireshark" group by running sudo usermod -a -G wireshark {your username} and then logging out and logging back in again.

解決辦法:

suguihua@suguihua-OptiPlex-3080:~/下載$ sudo groupadd wireshark
[sudo] suguihua 的密碼: 
suguihua@suguihua
-OptiPlex-3080:~/下載$ sudo chgrp wireshark /usr/bin/dumpcap suguihua@suguihua-OptiPlex-3080:~/下載$ sudo chmod 4755 /usr/bin/dumpcap suguihua@suguihua-OptiPlex-3080:~/下載$ sudo gpasswd -a suguihua wireshark 正在將使用者“suguihua”加入到“wireshark”組中

之後就可以愉快的抓包了