$ sudo apt-get install wireshark
$ sudo dpkg-reconfigure wireshark-common
$ sudo usermod -a -G wireshark $USER
$ sudo reboot Instead of rebooting, you can logout with this command:- Ubuntu Desktop:
$ gnome-session-quit --logout --no-prompt
SEtting up wlan0 in monitor mode
sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode monitor
sudo ifconfig wlan0 up