ADB failed to detect Nexus 5 running Android Marshmallow
I would highly advise to install Universal naked drivers on your Windows system as in windows only we encounter such driver issues.
Refer this link for Universal naked drivers: http://www.xda-developers.com/universal-naked-driver-solves-your-adb-driver-problems-on-windows/
Being a Nexus 5 user, I have encountered this problem and after great efforts, UND helped.
You can install the drivers by downloading zip file, unpacking it.
Connect your N5 to your PC, go to &quot;Device Manager&quot; in windows, uninstalling the already installed Nexus 5 Drivers. Install drivers by provided options and use the location of unzipped files when it asks for manual installation of drivers.