After scrolling with the mouse while pressing Ctrl in Nautilus, my icons for mounted hard drives have increased to the maximum size. (They are parallel to the thumbnails' view size, which looks like a bug to me. The size remains after a restart.) Anyway, I'd like to hide them. How can I do that?
Open Terminal and run the following command:
gsettings set org.gnome.nautilus.desktop volumes-visible 'false'
Alternatively, if you have (GNOME) Tweaks installed, you can use it to disable 'Mounted Volumes' under Desktop:
This won't work for Ubuntu 19.04 and later as desktop icons are handled by a GNOME Shell extension instead of Nautilus for those releases.
For Ubuntu 20.04 up to Ubuntu 20.10:
- Open the dconf editor, or if you don't have it installed, install it from the software center
- Click "org"
- Click "gnome"
- Click "shell"
- Click "extension"
- Click "desktop icons"
Then, on the window, disable the
show-mount option, and you are done.
P.S.: If you want to disable the dock mount icon go back and click dash-to-dock option in the extension section of previous step and from there around the bottom disable the show-mount option.
Location link is: /org/gnome/shell/extensions/desktop-icons/
Notice: On Ubuntu 20.04, Ubuntu on wayland: there seems to be no option
This answer might be useful for people using multiple monitors (tested on two monitors) with Ubuntu 19.10 and above.
Run the following command as mentioned in the other answers,
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false
After you run this, your entire dock might get hidden in the secondary monitors (will be visible only one of the monitors).
To circumvent this, restart the gnome-shell*.
This can be done by pressing Alt+F2, typing r and hit enter. Once the gnome-shell restarts you should have the dock restored in the other monitors.
*If you're on Wayland, you may need to restart the shell by logging out and logging in.