To disable GNOME's automounting feature, you will need to use the dconf-editor
utility.
dconf-editor
utility:sudo apt-get install dconf-editor
Once the installation is complete, launch dconf-editor
from the terminal or from the Applications menu.
In the dconf-editor
window, navigate to org > gnome > desktop > media-handling
.
Uncheck the box next to automount
to disable automounting.
Close the dconf-editor
window.
This will disable the automounting feature in GNOME and prevent removable media from being automatically mounted when they are inserted into the system. Note that this will not prevent the system from detecting and recognizing removable media, but it will prevent them from being automatically mounted and made available for use.
If you want to re-enable automounting, simply follow the steps above and check the box next to automount
in the dconf-editor
window.