Setting up wireshark for non root user
$USER
is here to see as a shell variable. The third command above adds your user to the wireshark group
and should be replaced by sudo adduser <yourUser> wireshark
.
Now you should be able to invoke wireshark as yourself (no need to sudo anymore).
As has been pointed out by Guerlando Ocs you may encounter a situation where the group wireshark doesn't exist. In this case you can resolve the problem by first running
sudo dpkg-reconfigure wireshark-common
and selecting yes so it creates the group for non root users.
This is how I installed Wireshark and made it work, running it as non-root user:
Install Wireshark:
sudo apt-get update
sudo add-apt-repository ppa:dreibh/ppa
sudo apt-get update
sudo apt-get install wireshark
Enable it to run as non-root user:
sudo dpkg-reconfigure wireshark-common
sudo adduser <yourUser> wireshark
sudo chmod +x /usr/bin/dumpcap