By default, the root permission is required to access the network port, while Wireshark only requires a UI of/usr/share/dumpcap, and/usr/share/dumpcap requires the root permission, therefore, non-root users cannot read the NIC list.
The solution is simple. sudo Wireshark
However, Wireshark does not officially recommend this:
Running as user "root" and group "root ".
This cocould be dangerous.
If you're running Wireshark this way in order to perform live capture, you may be want to be aware that there is a better way too ented
Therefore, use another method to change the group of/usr/share/dumpcap, add a group: Wireshark, chgrp to the wireshark group, and then change the group to the 750 permission to facilitate permission control.
sudo -sgroupadd wiresharkusermod -a -G wireshark <You own username>chgrp wireshark /usr/bin/dumpcapchmod 4750 /usr/bin/dumpcap
Also refer to the online solution and execute the following command
setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap
Getcap/usr/bin/dumpcap is used. The output must be/usr/bin/dumpcap = cap_net_admin, cap_net_raw + EIP.
Note that you must log out to take effect.
Official solutions http://packetlife.net/blog/2010/mar/19/sniffing-wireshark-non-root-user/