Here’s a short guide to show you how to hide mounted drives from the Ubuntu Dock in Ubuntu.
By default, Ubuntu shows icons for mounted drives on the Ubuntu Dock. These shortcuts make it quick and easy to access removable drives, SD cards, USB thumb sticks, drive partitions, and remote mounts (as you don’t need to open the file manager to get to them).
Whenever you insert a USB stick, an SD card and, or plug in an external drive—BAM!—an icon for it instantly appears in the Ubuntu Dock. You can click the icon to open it in the file manager, or right-click on it to access a
Safely Remove option.
But not everyone needs or wants visible access to their mounted drives.
If you have multiple removable drives attached at any one time, such as an SD card, external USB drive, and a remote cloud storage service, the dock can get quickly become crowded.
Thankfully, there’s a setting to stop mounted drives from appearing in the Ubuntu Dock. Access isn’t nuked entirely; can continue to use the Nautilus file manager to browse/open/eject them.
Don’t Show Mounted Drives in Ubuntu Dock
To stop mounted drives from showing in the Ubuntu Dock in Ubuntu 22.04 LTS:
- Open Settings
- Select Appearance in the sidebar
- Click ‘configure dock behaviour’ in the Dock section
- Slide the ‘Show Volumes and Devices’ toggle to off
In newer versions of Ubuntu the setting is located under Settings > Ubuntu Desktop.
The change will take effect immediately; you don’t need to log out and back in.
If you run an older version of Ubuntu, such as Ubuntu 18.04 LTS, you need to use the command-line to turn the ‘show mounts’ setting off:
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false
The change will take effect instantly and mounted drives showing on the Ubuntu Dock will instantly disappear from view.
If you change your mind and want to re-enable mounted drives on the Ubuntu Dock in future, just rerun the same command, omitting the ‘false’ switch at the end like so:
gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts true
You can access the same setting via a GUI if you install the
dconf-editor tool and navigate to the
org > gnome shell > extensions > dash-to-dock page, switching the
show-mounts toggle to the off position.
(Side-note: the Ubuntu Dock is based on the Dash to Dock extension which is why the command above references it).
Sadly it is not possible to choose specific mounts to appear in the dock. You either allow all, hide unmounted/remotes, or disable all.