How to Unmount Hard Drives on Ubuntu Safely

To unmount a hard drive on Ubuntu, use the eject control in Files for a removable drive, the stop button in Disks for a specific partition, or the umount command in Terminal. Save your work and let any file transfers finish first. If the drive is external and you plan to unplug it, use a safe-eject or power-off action rather than simply pulling the cable.

These instructions are for secondary internal drives, external hard drives, USB storage, and other mounted volumes. Do not try to unmount the root filesystem that Ubuntu is currently running from.

Unmounting vs. ejecting a drive

Unmounting detaches a filesystem from Ubuntu's directory tree, so its files are no longer accessible at the mount point. Ejecting or powering off an external drive goes a step further and prepares the physical device for removal. Ubuntu's official help recommends safely removing external storage before unplugging it because applications may still be using files or writes may still be in progress. See Ubuntu's safe-removal guidance.

Method 1: Unmount an external drive in Files

  1. Open Files from the Activities overview or app launcher.
  2. Find the external drive in the left sidebar. On current Ubuntu desktops, mounted removable storage normally appears there directly.
  3. Click the eject icon next to the drive, or right-click the drive and choose Eject.
  4. Wait for the drive to disappear from the mounted-devices list before disconnecting it.
Ubuntu Files window with a Seagate 1 TB external drive highlighted and its eject icon visible
In Files, use the eject control beside the external drive to remove it safely.

If Ubuntu reports that the volume is busy, cancel the removal, close documents or applications using files on that drive, close any file-manager window browsing it, and try again.

Method 2: Unmount a partition with Disks

The Disks utility is useful when a physical drive contains multiple partitions and you want to unmount one specific filesystem. Ubuntu documents Disks as the graphical tool for viewing and managing volumes and partitions. See Ubuntu's volume and partition guide.

  1. Open the Activities overview and launch Disks.
  2. Select the correct physical drive in the left column. Check its capacity and model carefully.
  3. Under Volumes, select the mounted partition you want to unmount.
  4. Click the square stop button below the volume map. If authorization is required, Ubuntu will ask for it.
Ubuntu Disks window showing a 1 TB hard drive, its partitions, and the square stop button used to unmount a volume
Select the mounted volume in Disks, then use the square stop button to unmount that filesystem.

If Disks is not installed, the package is named gnome-disk-utility. You can install it with sudo apt install gnome-disk-utility; the package is listed in the official Ubuntu package archive.

Method 3: Unmount a hard drive from Terminal

For exact control, first identify the filesystem and its mount point. Run:

lsblk -o NAME,FSTYPE,SIZE,LABEL,MOUNTPOINTS
Ubuntu Terminal showing lsblk output with an Archive partition mounted at /media/alex/Archive
lsblk helps match a partition such as /dev/sdb1 to its current mount point.

Then unmount the filesystem by its mount-point path:

sudo umount /media/alex/Archive
Ubuntu Terminal after sudo umount /media/alex/Archive completes and returns to the shell prompt
A successful umount normally returns to the prompt without an error message.

The current Ubuntu umount manual recommends specifying the directory where the filesystem is mounted; using a device path may work, but it is less reliable when one device has multiple mount points. For desktop-managed removable media, another option is udisksctl unmount -b /dev/sdb1. The Ubuntu udisksctl manual also provides udisksctl power-off -b /dev/sdb for safely powering off a removable drive before unplugging it.

What to do if “target is busy” appears

A filesystem cannot be cleanly unmounted while a process is actively using it. Close files stored on the drive, stop media players or backup tools accessing it, close file-manager tabs pointed at the drive, and make sure no Terminal window has its working directory there. For example, run cd ~ in terminals that were opened inside the mounted drive, then retry the normal unmount.

Avoid treating umount -l or force options as the default fix. Ubuntu's manual notes that lazy unmounting detaches the filesystem immediately and cleans up references later, which can introduce complications. Normal unmounting is the safer first choice for local disks.

How to mount the drive again

For a removable drive, open Files and click the device again. In Disks, select the volume and use the triangular mount button. From Terminal, a desktop-managed partition can be mounted with udisksctl mount -b /dev/sdb1. Always substitute the actual device name shown on your system.

Leave a Comment

How to Record Speaker Output on Linux with Audacity

How to Record Speaker Output on Linux with Audacity

Capture Linux desktop audio in Audacity by routing its recording stream to your output device’s monitor source. Follow PulseAudio and PipeWire steps, export tips, and fixes for silent tracks.

How to Use Dropbox on Linux: Install and Sync Your Files

How to Use Dropbox on Linux: Install and Sync Your Files

Install Dropbox on Linux from the official package, sign in, sync a local folder, manage selective sync, and check status from the command line.

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

How to Install Inkscape on Linux: Ubuntu, Fedora, Arch, and More

Install Inkscape from your Linux distribution’s repositories, the Ubuntu stable PPA, Snap, or Flathub, with current commands and notes for choosing a package source.

How to Find and Remove Duplicate Files on Linux With FSlint

How to Find and Remove Duplicate Files on Linux With FSlint

Use FSlint to scan selected Linux folders, review duplicate groups, and safely delete redundant files or learn when hard-link merging is appropriate.

How to Install SABnzbd on Linux and Configure It

How to Install SABnzbd on Linux and Configure It

Install SABnzbd on Ubuntu or Debian, or run it in Docker on another Linux host. Then open the web interface and configure your provider and download folders.

How to Install the Paper GTK Theme on Linux

How to Install the Paper GTK Theme on Linux

Install the Paper GTK theme from supported Linux repositories, enable it for GTK apps in GNOME Tweaks, and see what the legacy theme can and cannot change.

How to Install and Set Up Plex on OpenMediaVault with Compose

How to Install and Set Up Plex on OpenMediaVault with Compose

The old OpenMediaVault Plex plugin is archived. Set up Plex on OMV 8 with OMV-Extras, the Compose plugin, persistent storage, and Plex’s official container.

How to Clean and Speed Up Ubuntu Safely

How to Clean and Speed Up Ubuntu Safely

Clean and speed up Ubuntu with safe APT cleanup, storage checks, and startup controls that help free space and troubleshoot a sluggish desktop.

How to Install the Hiri Email Client on Linux

How to Install the Hiri Email Client on Linux

Install Hiri on Linux with its Snap package or official tarball, add a desktop launcher, and check supported accounts plus a warning about Hiri’s old Snap release.

How to Get System Specifications for a Linux PC

How to Get System Specifications for a Linux PC

Use Fastfetch and built-in Linux commands to check your distro, kernel, CPU, memory, graphics, storage, and connected devices, then save a clear report.