How to Hide Mounted Drives and USB Devices from the Ubuntu Dock

In standard installations of Ubuntu desktop, the default dock (powered by the Dash to Dock GNOME extension) automatically creates an icon for every external storage medium you connect. Whenever you insert a USB thumb drive, connect an external backup SSD, insert an SD card, or mount network shares and auxiliary hard drive partitions, their volume icons immediately appear at the bottom or side of your application launcher. For users who maintain multiple secondary partitions, keep external backup disks attached permanently, or simply prefer a clean, minimalist desktop layout focused exclusively on favourite applications, these mounted storage icons create unnecessary visual clutter. Fortunately, Ubuntu provides native toggles to hide mounted volumes from the dock completely. Here is how to hide mounted drives and USB devices from the Ubuntu dock.

Why Remove Mounted Volume Icons from the Dock?

Hiding external volumes and internal partitions from your primary dock provides several interface advantages:

  • Minimalist Desktop Aesthetic: Keeps your dock compact and predictable, showing only the software applications you choose to pin.
  • Reclaim Screen Real Estate: Prevents the dock from overflowing or shrinking application icons when multiple backup drives and partitions are mounted simultaneously.
  • Prevent Accidental Unmounting: Avoids mistakenly clicking “Eject” or opening file storage windows when navigating between productive apps.
  • Retain Full File Manager Access: Removing icons from the desktop launcher does not disconnect your drives; every storage volume remains readily accessible inside the Nautilus file manager.

Method 1: Hide Mounted Drives via Ubuntu Desktop Settings (GUI Method)

On modern versions of Ubuntu (including Ubuntu 22.04 LTS and Ubuntu 24.04 LTS), the graphical Settings control panel includes a dedicated switch for dock drives:

  1. Open the Settings application from your app launcher or top-right system status menu.
  2. In the left sidebar, click on Ubuntu Desktop.
  3. Scroll down to the Dock section.
  4. Locate the toggle named Show Mounted Drives (or Show volumes and devices).
  5. Toggle the switch to the Off position.

All connected USB drives, external disks, and secondary storage partitions will instantly vanish from your dock. If you ever need them visible again, returning to this menu and turning the switch back on restores them immediately.

Method 2: Hide Mounted Drives Using Terminal (gsettings Command)

If you prefer using the command-line interface or wish to automate desktop customisation across multiple workstations or scripting routines, use the gsettings command:

  1. Open your Terminal by pressing Ctrl + Alt + T.
  2. Execute the following command to disable mounted drives on the dock:
    gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts false
  3. The change applies instantly in real time without requiring a session restart or logout.
  4. If you ever want to re-enable mounted drive icons in the future, simply run:
    gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts true

Comparison: Dock Configuration Directives in Ubuntu

Setting Directive Default Value Modified Setting Visual Impact on Desktop
show-mounts true false Hides USBs, SSDs, and external volumes from dock
show-trash true false Hides the Rubbish Bin icon from dock
dock-fixed true false Enables auto-hiding dock when windows overlap

Accessing Hidden Drives Quickly in Nautilus File Manager

With volume icons hidden from the application dock, accessing files on your USB drives remains quick and straightforward:

  1. Click the Files icon (Nautilus) on your dock or press Super + E.
  2. Look at the left sidebar under the Other Locations heading or the pinned drives list.
  3. All attached USB devices, SD cards, and internal partitions are listed clearly with their volume labels.
  4. To safely remove a device, simply click the small Eject icon beside its name in the file manager sidebar before unplugging the physical cable.

Applying this adjustment gives you a sleek, focused Linux desktop while keeping your data drives safely accessible whenever needed.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.