Linux · How-To

How to Mount a Drive in Linux

By , Editor · · Updated for 2026
The short answer

Find the drive with lsblk -f, create an empty folder to hold it, then attach it with sudo mount /dev/sdb1 /mnt/data, substituting your own device name. That mounts it for the current session only. To have it come back automatically after every reboot, add one line to /etc/fstab that refers to the drive by its UUID.

The short version: find the drive with lsblk -f, create an empty folder to hold it, and attach it with sudo mount /dev/sdb1 /mnt/data (swap in your own device name). That mounts it for the current session. To have it come back automatically after every reboot, add one line to /etc/fstab that references the drive's UUID. The rest of this guide walks through each of those steps carefully, plus unmounting, auto-mounting removable media in your desktop, and reading Windows (NTFS) drives.

Commands below work across the major families — Ubuntu and Debian, Fedora, and Arch — because mount, lsblk, blkid and /etc/fstab are part of the core Linux toolset (util-linux) rather than any one distribution. Where something genuinely differs by distro, such as installing a package, we call it out.

How mounting works

Unlike Windows, Linux has no drive letters. Instead there is a single directory tree that starts at / (the root), and every storage device is grafted onto some folder within that tree. That folder is called a mount point. Once a filesystem is mounted at, say, /mnt/data, everything on the drive appears inside that directory, and you read and write it like any other folder.

A drive itself is a block device — you will see names like /dev/sda (the first disk), /dev/sdb (the second), or /dev/nvme0n1 for an NVMe SSD. The disk is divided into partitions, numbered: /dev/sda1, /dev/sda2, and so on. You mount a partition (which holds a filesystem), not the whole disk. Your job is simply to point the right partition at the right folder.

Tip — you probably don't need to touch most drives

Your system disk and its partitions are already mounted at boot. Modern desktops (GNOME, KDE Plasma, Xfce and others) also mount USB sticks and external drives automatically the moment you plug them in. You only need the manual steps here for internal secondary drives, network shares, or when you want a permanent, predictable mount that survives reboots.

Step 1 — List your drives

Before mounting anything, identify the device. The friendliest tool is lsblk (list block devices). Add -f to show each filesystem's type, label, UUID and current mount point:

lsblk -f

You'll get a tree that looks roughly like this:

NAME        FSTYPE LABEL   UUID                                 MOUNTPOINTS
sda
├─sda1      vfat   ESP     1234-ABCD                            /boot/efi
└─sda2      ext4   root    a1b2c3d4-1111-2222-3333-abcdef012345 /
sdb
└─sdb1      ext4   backup  9f8e7d6c-4444-5555-6666-fedcba987654

Here sdb1 is a second drive that is not yet mounted (its MOUNTPOINTS column is empty). That is the one we'll work with. Note its device name and UUID — you'll use both later.

For a lower-level view, blkid prints the UUID and filesystem TYPE of each partition. It usually needs sudo to show everything:

sudo blkid
/dev/sdb1: LABEL="backup" UUID="9f8e7d6c-4444-5555-6666-fedcba987654" TYPE="ext4" PARTUUID="..."
Caution — mount partitions, not whole disks, and never format the wrong one

Double-check the device name against its size and label in lsblk output before you act. Commands that create filesystems (mkfs) or partition tables (fdisk, parted) erase everything on the target — running one against your system disk (/dev/sda) instead of the new drive (/dev/sdb) will destroy your installation. This guide only mounts existing filesystems, which is safe and non-destructive. Take extra care whenever a command begins with sudo, and never run rm -rf or a formatting command until you are certain of the path.

Step 2 — Create a mount point

A mount point is just an empty directory. By convention, drives you mount yourself live under /mnt. Create one:

sudo mkdir -p /mnt/data

Any empty folder works — you could use /mnt/backup or a directory in your home folder. Avoid mounting onto a directory that already contains files, because the drive's contents will hide them until you unmount again.

Step 3 — Mount the drive manually

Attach the partition to the folder with sudo mount:

sudo mount /dev/sdb1 /mnt/data

That's it — the drive's contents are now available under /mnt/data. Confirm it worked:

df -h /mnt/data

In most cases the kernel detects the filesystem type automatically. If you ever need to state it explicitly, use -t, for example -t ext4 or -t ntfs3:

sudo mount -t ext4 /dev/sdb1 /mnt/data

Step 4 — Unmount safely

When you're done, detach the filesystem with umount (note the spelling — there is no first "n"). You can pass either the mount point or the device:

sudo umount /mnt/data

Unmounting flushes any cached writes to the disk, so it is essential before you unplug an external drive. If Linux complains that the target is busy, something is still using it — close any file manager window or terminal that is sitting inside the folder. You can see what is holding it with lsof +f -- /mnt/data or fuser -vm /mnt/data.

Caution — don't just pull the cable

Removing a USB drive while it is still mounted can corrupt files, because writes may still be sitting in memory rather than on the disk. Always unmount (or use your desktop's eject / safely remove button) first, wait for it to finish, then unplug.

Auto-mounting removable drives in your file manager

For everyday USB sticks and external disks you rarely need the command line at all. On a standard desktop, plugging in a drive triggers the udisks2 service, which mounts it under /media/<your-username>/ using the drive's label as the folder name, and pops it up in your file manager's sidebar. This happens without sudo because a polkit rule grants the logged-in user permission to mount removable media.

To remove such a drive, click the eject icon next to it in the file manager rather than unplugging it directly. If automatic mounting isn't happening on a minimal or server install, make sure the udisks2 package is present and the service is running.

Making the mount persistent with /etc/fstab

A manual mount lasts only until you reboot. For an internal drive you always want available — a data disk, a separate /home, a backup volume — add it to the filesystem table, /etc/fstab, so the system mounts it automatically at boot.

Always reference the UUID, not the device name. Names like /dev/sdb1 can change between boots if you add or remove hardware, whereas a UUID is baked into the filesystem when it is created and stays put. The fstab(5) manual page says the same thing — LABEL= or UUID= is "the recommended method, as device names are often a coincidence of hardware detection order, and can change" — and it is also where the six fields in the table above, including the dump flag and the fsck pass number, are defined. Get the UUID from lsblk -f or blkid as shown above.

First, back up the file — a mistake here can stop the machine from booting normally:

sudo cp /etc/fstab /etc/fstab.bak

Then open it in a text editor as root (use whichever editor you have, e.g. nano or vim):

sudo nano /etc/fstab

Add a single line at the end. Each fstab entry has six fields, separated by spaces or tabs:

FieldExampleMeaning
1 · deviceUUID=9f8e7d6c-…Which filesystem to mount
2 · mount point/mnt/dataWhere to attach it
3 · typeext4Filesystem type (or auto)
4 · optionsdefaults,nofailMount options, comma-separated
5 · dump0Legacy backup flag; almost always 0
6 · pass2fsck order at boot: 1 for root, 2 for others, 0 to skip

Put together, using your real UUID, the line looks like this:

UUID=9f8e7d6c-4444-5555-6666-fedcba987654  /mnt/data  ext4  defaults,nofail  0  2

The nofail option is worth including: it tells the system to continue booting even if the drive is missing (handy for external or removable disks), instead of dropping into an emergency shell. The mount(8) manual page defines it simply as "do not report errors for this device if it does not exist".

Before rebooting, test the file. This mounts everything in fstab that isn't already mounted, and will report syntax errors:

sudo mount -a

If mount -a completes with no errors and df -h shows your drive at /mnt/data, the entry is correct and will mount automatically from now on.

Caution — a bad fstab line can block boot

An entry with a wrong UUID or a typo can, on some systems, leave the machine hanging at boot or dropping to a recovery prompt. That is exactly why you back the file up, add nofail, and run sudo mount -a to validate it before you reboot. If a machine ever won't boot after an fstab edit, boot into recovery/emergency mode, restore your backup with cp /etc/fstab.bak /etc/fstab, and reboot.

Reading NTFS / Windows drives

Dual-booters and anyone moving an external drive between Windows and Linux will meet NTFS. Modern kernels (5.15 and newer, which covers every current Ubuntu, Fedora, Debian and Arch release) include the in-kernel ntfs3 driver, which reads and writes NTFS without any extra software — the kernel's own ntfs3 documentation calls it a "fully functional NTFS Read-Write driver" and lists the uid, gid and umask mount options used further down this page. Recent versions of mount select it automatically, but you can name it explicitly:

sudo mount -t ntfs3 /dev/sdb1 /mnt/windows

The older userspace driver, ntfs-3g, is still widely used and reliable. If it isn't already installed, add it with your package manager:

sudo apt install ntfs-3g      # Debian / Ubuntu
sudo dnf install ntfs-3g      # Fedora
sudo pacman -S ntfs-3g        # Arch

Because NTFS (and FAT) don't store Linux ownership and permissions, mounting them as your user often needs the uid, gid and umask options so you can write to the drive. In an fstab line that looks like:

UUID=1A2B3C4D5E6F7788  /mnt/windows  ntfs3  defaults,uid=1000,gid=1000,umask=022,nofail  0  0

Use id -u and id -g to find your own numeric IDs (1000 is typical for the first user account). Note the pass field is 0 for NTFS — the Linux fsck tools don't check NTFS.

Caution — Windows Fast Startup makes NTFS read-only

If a Windows drive mounts read-only or refuses to mount read-write, Windows almost certainly saved a hibernation image via Fast Startup. Linux won't write to a hibernated NTFS volume, because doing so could corrupt the pending Windows session. Boot back into Windows, choose Shut down (not Restart), and turn off Fast Startup under Control Panel → Power Options → Choose what the power buttons do. Then the drive will mount read-write from Linux.

Frequently asked

Where are drives usually mounted in Linux?

By convention, drives you mount yourself go under /mnt (for example /mnt/data), while removable media that your desktop mounts automatically appears under /media/<your-username>/ named after the drive's label. Neither location is enforced by the kernel — a mount point is just an empty directory, so you can choose another path if you prefer.

Do I need sudo to mount a drive in Linux?

Mounting manually with the mount command, or editing /etc/fstab, requires root, so you use sudo. Plugging in a USB stick and clicking it in your file manager does not need sudo, because the desktop mounts it for you through the udisks2 service and a polkit rule that authorises the logged-in user.

Why is my Windows NTFS drive mounted read-only?

The usual cause is Windows Fast Startup or hibernation, which leaves the NTFS filesystem in a hibernated or 'dirty' state. Linux refuses to write to it to protect your data and mounts it read-only. Fully shut Windows down and turn off Fast Startup (Control Panel, Power Options, Choose what the power buttons do), then the drive will mount read-write.

How do I safely remove a USB drive in Linux?

Always unmount before you unplug. In a file manager, click the eject or safely-remove icon next to the drive. On the command line, run sudo umount /mnt/data (or umount the device path). Unmounting flushes any cached writes to the disk; pulling the drive out while it is still mounted risks corrupting files.

More Linux guides

This is part of the growing Linux section on Windows Now. Browse all Linux guides, or head back to the Windows Now home page.