1. Enable Developer options and enable USB debugging.
2. Install necessary MTP modules to your computer:
sudo apt-get install mtp-tools mtpfs
3. Configure 51-android.rules
sudo gedit /etc/udev/rules.d/51-android.rules
paste the following at the end of the file (if the file does not exist then just paste):
#LG – Nexus 5
SUBSYSTEM==”usb”, ATTR{idVendor}==”18d1", MODE=”0666"
4. Make the file executable:
sudo chmod +x /etc/udev/rules.d/51-android.rules
5. Restart udev
sudo service udev restart