How To Mount A Drive In Ubuntu

8 min read

Mounting a drive in Ubuntu is a fundamental skill for anyone managing a Linux system, whether you are setting up a home server, dual-booting with Windows, or simply trying to access files on an external USB stick. Unlike Windows, which automatically assigns drive letters like D: or E:, Linux integrates every storage device into a single unified directory tree starting at the root (/). This process—making a filesystem accessible at a specific directory point—is what we call mounting Practical, not theoretical..

Understanding how to mount a drive in Ubuntu gives you granular control over your storage, allowing you to manage permissions, automate backups, and troubleshoot unrecognized hardware. This guide covers everything from the quick graphical method to the strong, permanent command-line configuration required for servers and power users.

Understanding the Linux Filesystem Hierarchy

Before diving into commands, it helps to visualize where drives actually go. In Ubuntu, the root directory (/) holds the operating system. Also, additional drives are not given separate roots; instead, they are attached—mounted—to empty directories (folders) inside this tree. These directories are called mount points.

Take this: if you have a 2TB hard drive for media, you might mount it at /mnt/media or /home/username/Videos. Once mounted, navigating to that folder shows the contents of the physical drive. If you unmount it, the folder appears empty again (revealing any files previously stored in the folder itself, which were hidden by the mount).

Worth pausing on this one.

Key locations you will encounter:

  • /mnt: Traditionally used for temporary mounts (like USB drives or network shares mounted manually). That said, * /media: The standard location where the desktop environment (GNOME, KDE) automatically mounts removable media (USB sticks, external HDDs). * /etc/fstab: The configuration file that defines how drives are mounted automatically at boot.

Method 1: The Graphical Interface (Easiest for Beginners)

If you are running Ubuntu Desktop (the default GNOME environment), you rarely need the terminal for removable drives.

  1. Open the Files application (Nautilus).
  2. Look at the left sidebar under "Other Locations" or directly in the main pane.
  3. Click the drive you wish to access. Ubuntu will automatically mount it, usually under /media/your_username/drive_label.
  4. To safely remove it, click the eject icon next to the drive name in the sidebar before physically unplugging it.

This method handles filesystem detection (NTFS, exFAT, ext4) and permissions automatically. It is perfect for flash drives and occasional external hard drives.

Method 2: The Command Line (Manual & Temporary)

For servers, headless setups, or when the GUI fails, the terminal is your primary tool. The standard command is mount.

Step 1: Identify the Block Device

First, you need to know the device identifier (e.g., /dev/sdb1, /dev/nvme0n1p2). Run:

lsblk -f

The -f flag shows filesystem types (FSTYPE), labels, and UUIDs. That said, , sda1). * FSTYPE: Filesystem (ext4, ntfs, vfat/fat32, exfat). g.* UUID: Unique identifier (crucial for permanent mounting). In real terms, look for your target drive based on size (SIZE), partition number, and filesystem. So naturally, * NAME: Device path (e. * MOUNTPOINT: Where it is currently mounted (blank if unmounted).

Step 2: Create a Mount Point

You need an empty directory to serve as the access point.

sudo mkdir -p /mnt/my_external_drive

Using /mnt is standard practice for manual/admin mounts. Avoid mounting directly in /home unless you intend it to be a permanent user-specific storage.

Step 3: Mount the Drive

The basic syntax is sudo mount /dev/device_name /mount/point.

For Linux native filesystems (ext4, xfs, btrfs):

sudo mount /dev/sdb1 /mnt/my_external_drive

For Windows filesystems (NTFS): You usually need the ntfs-3g driver installed (sudo apt install ntfs-3g) The details matter here. But it adds up..

sudo mount -t ntfs-3g /dev/sdb1 /mnt/my_external_drive

For FAT32 / exFAT (USB sticks):

sudo mount -t vfat /dev/sdb1 /mnt/my_external_drive
# For exFAT (requires exfat-fuse / exfatprogs installed)
sudo mount -t exfat /dev/sdb1 /mnt/my_external_drive

Step 4: Verify and Access

Run df -h /mnt/my_external_drive to confirm it is mounted and check available space. You can now cd /mnt/my_external_drive and manage files.

Step 5: Unmounting

When finished, ensure no processes are using the drive (lsof /mnt/my_external_drive), then run:

sudo umount /mnt/my_external_drive

Note the spelling: umount (no 'n' after the 'u').

Method 3: Permanent Mounting via /etc/fstab (The Professional Way)

Manual mounts disappear after a reboot. To make a drive mount automatically at startup—essential for secondary internal drives, NAS shares, or dedicated backup disks—you must edit the File System Table (/etc/fstab) The details matter here..

Warning: An incorrect entry in /etc/fstab can prevent Ubuntu from booting. Always back up the file first:

sudo cp /etc/fstab /etc/fstab.backup

1. Get the UUID (Best Practice)

Device names (/dev/sdb1) can change if you plug in another drive or change BIOS boot order. UUIDs never change. Find it using:

sudo blkid /dev/sdb1

Copy the long alphanumeric string next to UUID="...".

2. Edit the File

Open the configuration file with a safe editor:

sudo nano /etc/fstab

3. Add the Entry

Add a new line at the bottom using this structure: UUID=your-uuid-here /mount/point filesystem-type options dump pass

Example for an ext4 data drive:

UUID=1234-5678-ABCD-EF01  /mnt/data  ext4  defaults,noatime  0  2

Example for an NTFS drive (shared with Windows dual-boot):

UUID=ABCDEF1234567890  /mnt/windows_drive  ntfs-3g  defaults,uid=1000,gid=1000,umask=022,windows_names  0  0
  • uid=1000,gid=1000: Sets ownership to the first created user (usually you), allowing read/write without sudo.
  • windows_names: Prevents creating files with characters illegal in Windows (like : or ?).

Example for exFAT flash drive:

UUID=ABCD-1234  /mnt/usb  exfat  defaults,nofail,user,umask=000  0  0
  • nofail: Critical for external drives. If the drive is missing at boot, Ubuntu continues booting instead of dropping to emergency mode.
  • user: Allows non-root users to mount/unmount this specific entry using `mount /mnt/

usbwithout needingsudo`.

4. Test Before Rebooting

Never trust an fstab edit until you've tested it. The mount -a command mounts all entries in /etc/fstab that aren't already mounted, surfacing any syntax errors immediately:

sudo mount -a

If this returns no output, your entry is valid. If it throws an error, fix it now—while you still have a working terminal—rather than discovering it on the next boot And that's really what it comes down to..

5. The dump and pass Fields Explained

The last two columns confuse most newcomers:

  • dump: A legacy backup flag. Set it to 0 for everything on modern systems; the dump utility is rarely used today.
  • pass: Controls filesystem check order at boot. Use 0 for non-ext filesystems (NTFS, exFAT, FAT32) and network shares. For ext4, use 2 for secondary drives and 1 only for the root filesystem.

Choosing the Right Method

Scenario Recommended Method
One-off file transfer from a USB stick Method 2 (manual mount)
Temporary access to a friend's drive Method 2 (manual mount)
Secondary internal SSD/HDD Method 3 (fstab)
Windows dual-boot data partition Method 3 (fstab)
NAS or network storage Method 3 (fstab)
Backup drive that's sometimes absent Method 3 with nofail

Troubleshooting Common Issues

"Drive is read-only" on an NTFS disk This usually means Windows hibernated instead of fully shutting down, leaving the filesystem in a "dirty" state. Boot into Windows, disable Fast Startup (Control Panel → Power Options → "Choose what the power buttons do"), and shut down completely. Alternatively, force a repair mount:

sudo ntfsfix /dev/sdb1

"unknown filesystem type 'exfat'" The driver isn't installed. Install it with:

sudo apt install exfat-fuse exfatprogs

System drops to emergency mode after editing fstab Your entry has an error or references a missing drive without nofail. At the emergency prompt, remount the root filesystem as writable and restore your backup:

mount -o remount,rw /
sudo cp /etc/fstab.backup /etc/fstab
reboot

Permission denied when writing to the mount point For ext4 drives, ownership defaults to root. Change it to your user:

sudo chown -R $USER:$USER /mnt/data

Conclusion

Mounting drives in Ubuntu comes down to understanding three approaches: the automatic mounting handled by your desktop environment, manual mounting for quick one-time access, and /etc/fstab entries for permanent, reboot-proof configuration. In practice, for everyday use with modern GNOME or KDE, simply plugging in a drive is enough. When you need control—scripting, servers without a GUI, or drives that must be present at every boot—the command line gives you precision that the desktop can't.

The single most important habit to build is testing your /etc/fstab changes with sudo mount -a before rebooting, and always keeping a backup of the original file. A malformed fstab is one of the few mistakes that can render a Linux system unbootable, but it's also one of the easiest to recover from when you've prepared for it That's the part that actually makes a difference. That alone is useful..

Master these methods and you'll handle any storage scenario Linux throws at you—from a borrowed thumb drive to a permanent multi-terabyte data array—with confidence Not complicated — just consistent. Which is the point..

Fresh Stories

Newly Added

Curated Picks

More Worth Exploring

Thank you for reading about How To Mount A Drive In Ubuntu. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home