Q:

Mounting an USB will prevent viruses? 

Yesterday, I used dconf editor to prevent my laptop to automount an USB device.  So, for example, if an USB had some Linux viruses (even if it's rare to find one), would it only activate if the USB were mounted? 
I will already say sorry is there was another thread that answered my question (I searched, but didn't find one)
And, thank you for helping me. 

A:

Short answer
Ubuntu doesn't execute any software on external media unless you tell it to.  It's perfectly safe to automatically mount any file systems you find. 
Long answer
It is theoretically possible to craft a file system that would trigger a bug in the file system driver and corrupt the kernel.  It's also theoretically possible to craft the firmware of a USB device so that it corrupts the Linux USB stack as soon as you connect it and the computer starts to interact with it.  Yet there are no (publicly) known vulnerabilities to any of the two, and if there were, it would be fixed almost instantaneously.  You're relatively safe here and should focus your mitigation efforts on more likely attack vectors¹.
¹ unless you run a nuclear energy facility in a Terrorist State™.