Linux online course

How to Mount a USB Drive Manually in Linux

Learn how to safely identify, mount, access, unmount, troubleshoot, and persistently configure a USB drive from the Linux command line.

Many desktop Linux systems automatically mount removable media when you connect it. Manual mounting is useful on minimal installations, servers, older distributions, systems with automount disabled, and terminal-only or remote sessions.

Connecting a USB device and mounting its filesystem are different operations. The kernel may detect the hardware and create a device node under /dev, but the files become accessible through the normal directory tree only after the filesystem is mounted.

Understand USB disks, partitions, and filesystems

A block device is a device file representing storage hardware. Linux commonly names a USB disk /dev/sdb, although the actual letter may differ. An entire disk can contain one or more partitions, such as /dev/sdb1 and /dev/sdb2.

A filesystem is the format that organizes files on a partition. Common removable-media filesystems include FAT32, usually shown as vfat, exFAT, NTFS, and ext4. In the usual case, you mount a partition such as /dev/sdb1, not the entire disk such as /dev/sdb.

The relationship is:

USB hardware → /dev/sdb (whole block device) → /dev/sdb1 (partition) → filesystem → /mnt/usb (mount point)

Some devices have no partition table and contain a filesystem directly on the whole device, but do not assume that is true. Inspect the device first. For background, see the Linux file structure and GPT partitions.

Identify the USB device safely

Compare disks before and after insertion

  1. Run lsblk -f before inserting the drive and note the existing disks.
  2. Insert the USB drive and wait a moment for the kernel to detect it.
  3. Run lsblk -f again.
  4. Find the newly appearing device using its size, model, label, filesystem type, and partition layout.

lsblk -f is the preferred first inspection command because it displays block devices, partitions, filesystem types, labels, UUIDs, and mount points.

$ lsblk -f
NAME   FSTYPE FSVER LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1 ext4         system     1111-2222-3333-4444                  80G    20% /
└─sda2 swap                    aaaa-bbbb                            [SWAP]
sdb
└─sdb1 exfat        TRANSFER   1234-ABCD

In this example, /dev/sdb1 is a likely removable partition, but verify its size and identity against the physical drive. Do not choose a device solely because it has a familiar-looking name.

Use alternative identification methods

sudo fdisk -l shows disks, partition tables, sizes, and partition types. It is useful when you need more partition-table detail, but it normally requires elevated privileges.

sudo fdisk -l

Kernel messages can show which device appeared recently:

dmesg | tail -n 30
journalctl -k -n 30

On some systems, reading dmesg requires sudo. The messages may mention a USB device, its model, and a partition such as sdb1. If the device does not appear at all, also check lsusb.

Before any write-related operation, verify the drive's physical size, model, label, and partition path. This is especially important before using partitioning or formatting tools.

Inspect the filesystem and current mount state

Use the following commands to determine the filesystem type, UUID, label, and whether the partition is already mounted:

lsblk -f
sudo blkid /dev/sdb1
findmnt /dev/sdb1
mount

findmnt reports the filesystem's current mount location. mount without arguments lists currently mounted filesystems. You can also inspect a particular path:

findmnt /mnt/usb

If a desktop automounter has already mounted the drive, lsblk -f may show a mount point and findmnt /dev/sdb1 will show it. Use that existing location, or unmount it cleanly before mounting it somewhere else.

Filesystem support depends on the kernel and, for some formats, user-space helper packages. FAT32 is commonly shown as vfat. exFAT and NTFS support may require distribution-specific packages or drivers. Encryption and filesystem damage require separate procedures; a normal mount command cannot unlock encrypted storage or repair corruption.

Create a mount point

A mount point is an existing directory where Linux makes the mounted filesystem accessible. For a temporary administrator-created mount, /mnt is conventional.

sudo mkdir -p /mnt/usb

The -p option creates missing parent directories and does nothing harmful if the directory already exists. Creating a directory under /mnt generally requires sudo.

Mount the USB partition

The general syntax is:

sudo mount DEVICE MOUNT_POINT

For a verified partition, Linux can often detect the filesystem automatically:

sudo mount /dev/sdb1 /mnt/usb

If detection fails, or if you want to be explicit, specify the filesystem type with -t:

sudo mount -t vfat /dev/sdb1 /mnt/usb

Use the type reported by lsblk -f or blkid. Do not force a guessed type because the wrong helper can produce errors or unsafe behavior.

Useful mount options

A read-only mount is useful when inspecting an unfamiliar or potentially damaged drive:

sudo mount -o ro /dev/sdb1 /mnt/usb

ro means read-only: programs can read files but cannot make filesystem changes through that mount. It does not repair corruption or protect against every possible hardware failure.

Linux-native filesystems such as ext4 store Unix ownership and permissions in the filesystem. FAT-family filesystems do not provide the same native Unix permission model, so ownership and modes are commonly presented through mount options such as uid, gid, and umask. For example, a system may use an entry similar to:

sudo mount -t vfat -o uid=1000,gid=1000,umask=022 /dev/sdb1 /mnt/usb

Use the correct options for the installed filesystem driver. Options vary between filesystems and distributions; do not copy ownership values without checking the intended user and group IDs.

Confirm the mount

findmnt /mnt/usb
lsblk -f
df -h /mnt/usb
mount | grep /mnt/usb

A successful result identifies /mnt/usb as the target and shows the mounted device. If mounting fails, read the complete error message and compare the specified filesystem type with lsblk -f.

Access files after mounting

After mounting, access files through the mount-point directory, not by trying to read a path such as /dev/sdb1. Device nodes represent storage devices; they are not ordinary directories.

cd /mnt/usb
pwd
ls -la
find . -maxdepth 1 -type f -print
cd /

Whether you can create, modify, or delete files depends on the filesystem and mount options. ext4 uses the stored Unix owner, group, and mode bits. FAT32 and commonly configured exFAT or NTFS mounts present ownership and permissions according to options such as uid, gid, and umask. A root-created mount point can also have directory permissions that prevent an ordinary user from entering it.

For permission fundamentals, see managing file ownership. You can inspect the mounted directory with:

ls -ld /mnt/usb
findmnt -o TARGET,SOURCE,FSTYPE,OPTIONS /mnt/usb

Unmount the USB drive safely

Unmounting detaches the filesystem cleanly. It gives Linux an opportunity to flush pending writes and release filesystem state. Always unmount before physically removing the drive, and wait for visible write activity to finish.

The command is umount, without the letter n:

sudo umount /mnt/usb

You can also unmount by device path:

sudo umount /dev/sdb1

Check that the mount is gone:

findmnt /mnt/usb
lsblk -f

No mount entry for /mnt/usb confirms that the filesystem is no longer mounted. The device may still be electrically connected; it is now safe to remove once all write activity has stopped.

Fix a busy mount point

An error such as umount: /mnt/usb: target is busy means a process is still using the filesystem. Common causes include:

  • A shell whose current directory is somewhere under /mnt/usb.
  • A file manager window browsing the drive.
  • An editor, media player, backup program, or other application with an open file.
  • A background process whose working directory or open files are on the drive.

First, leave the directory in every shell:

cd /
sudo umount /mnt/usb

Close file-manager windows and applications, then locate remaining users with fuser or lsof:

sudo fuser -vm /mnt/usb
sudo lsof +D /mnt/usb

lsof can be expensive on large directory trees. Stop or exit the identified processes normally, then retry umount. Forceful or lazy options can have consequences: a lazy unmount detaches the path while references remain, and forceful unmounting can risk data integrity depending on the filesystem and situation. Use them only when you understand the implications.

Persist a USB mount with /etc/fstab

/etc/fstab is the system configuration file describing filesystems that can be mounted consistently during boot or when mount -a is run. It is appropriate when a known USB drive should appear at the same directory, but removable media needs extra care because it may be absent.

Do not use a volatile path such as /dev/sdb1 for a persistent entry. The kernel may assign a different letter after reboot or after another disk is connected. Use a stable UUID, or a unique human-readable LABEL, obtained with:

lsblk -f
sudo blkid /dev/sdb1

Create the target directory before adding the entry:

sudo mkdir -p /mnt/usb

A simple example is:

UUID=1234-ABCD /mnt/usb auto defaults,nofail,x-systemd.device-timeout=5s 0 0

Replace the example UUID with the actual UUID of the intended partition. The nofail option prevents an absent removable drive from making boot fail. x-systemd.device-timeout=5s limits how long a systemd-based system waits for the device. Choose filesystem-specific options when necessary; auto asks the system to detect the filesystem.

The six fstab fields

Field positionPurposeExample valueNotes
Source identifierIdentifies the filesystemUUID=1234-ABCDPrefer UUID or a unique LABEL over /dev/sdX1.
Mount pointDirectory where files appear/mnt/usbThe directory must already exist.
Filesystem typeFilesystem driver or detection modeautoUse vfat, exfat, ntfs, or ext4 when appropriate.
Mount optionsControls access and behaviordefaults,nofailAdd filesystem-specific ownership or read-only options as needed.
Dump settingLegacy dump backup setting0Usually 0 for removable media.
Filesystem-check settingOrder for filesystem checks0Often 0 for removable filesystems; use appropriate values for the system and filesystem.

Edit the file carefully, preferably keeping a backup:

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

With the USB drive connected, test the configuration before rebooting:

sudo mount -a
findmnt /mnt/usb
lsblk -f

If mount -a reports an error, correct the UUID, filesystem type, options, or target directory before restarting. A missing device should be acceptable when nofail is present, but a malformed entry can still cause problems.

Command reference

CommandPurposeTypical privilege requirementWhat to verify
lsblk -fList devices, filesystems, labels, UUIDs, and mount pointsUsually noneSize, model context, partition, filesystem, and current mount
sudo fdisk -lDisplay partition-table informationsudo commonly requiredDisk size, partition boundaries, and device identity
dmesg | tail -n 30 or journalctl -kReview recent kernel storage messagessudo may be required for dmesgUSB recognition, assigned device name, and errors
sudo blkidQuery filesystem metadataOften sudoUUID, LABEL, and filesystem type
mkdir -pCreate a mount-point directorysudo under /mntTarget exists and does not contain files to hide
mountAttach a filesystemUsually sudoCorrect partition, type, options, and target
findmntShow mount relationships and optionsNone for inspectionExpected source is attached to expected target
df -hView space usageNoneMounted filesystem and available capacity
umountDetach a filesystem cleanlyUsually sudoNo remaining mount entry before removal
fuserFind processes using a mount pointsudo recommendedProcesses that must exit before unmounting
lsofList open files and processessudo recommendedApplications or shells holding the filesystem

Common USB filesystem considerations

FilesystemTypical Linux supportPermission behaviorUseful mount considerations
vfat/FAT32Usually built inNo native Unix ownership or permission bitsUse options such as uid, gid, and umask; individual files cannot use Unix permissions.
exFATUsually available with a suitable kernel driver and toolsPermissions are commonly presented through mount optionsVerify the exFAT helper or driver is installed; use appropriate ownership options.
NTFSSupport depends on the kernel driver or user-space helperOften presented through mount options rather than native Unix metadataConfirm whether the system uses ntfs3 or another helper and follow its supported options.
ext4Native Linux support is commonStores Unix owners, groups, and modes nativelyCheck ownership and permissions normally; it is less interoperable with non-Linux systems.

Troubleshoot mounting problems

The drive does not appear in lsblk

Reconnect it and inspect dmesg or journalctl -k. Try another USB port or cable and check power, especially for bus-powered disks. In a virtual machine, confirm that the USB device has been assigned to the guest. If the device remains absent, suspect hardware or connection problems rather than a mount-point problem.

Unknown filesystem type or missing helper

Check the actual type with lsblk -f or blkid. Install the distribution-appropriate support package if required. Do not force a filesystem type based on guesswork. If the type is correct but mounting still fails, the filesystem may be damaged or the device may have hardware faults. Consider a read-only inspection and a separate filesystem-repair procedure.

The device is already mounted

Automount may have mounted it elsewhere. Run findmnt, lsblk -f, or mount to locate the existing mount point. Use that location, or unmount it cleanly before choosing another mount point.

Permission denied when accessing files

Check the mount-point directory and active options:

ls -ld /mnt/usb
findmnt -o TARGET,SOURCE,FSTYPE,OPTIONS /mnt/usb

On ext4, correct the filesystem ownership or mode as appropriate. On FAT32, exFAT, and many NTFS configurations, adjust the mount's uid, gid, and umask options instead.

Unmount reports that the target is busy

Move every shell out of the mount directory, close file managers and applications, then use sudo fuser -vm /mnt/usb or sudo lsof +D /mnt/usb. Stop the processes normally and retry sudo umount /mnt/usb.

Boot is delayed after an fstab change

The device may be absent, the UUID or filesystem type may be wrong, or the mount point may not exist. Test with sudo mount -a while the drive is connected, use UUID or LABEL instead of /dev/sdX1, add nofail for removable media, and verify the directory exists.

Safety and data integrity checklist

  • Identify the disk by size, model, label, and partition before any write operation.
  • Never format or repartition a device until its identity has been independently verified.
  • Use -o ro when examining an unfamiliar or potentially damaged filesystem.
  • Unmount with umount before disconnecting, and wait for write activity to finish.
  • Do not use forceful or lazy unmount options unless you understand their effects.
  • Encrypted drives may require unlocking first, such as with the system's encryption tools; mounting the raw encrypted partition directly is not the complete procedure.
  • Filesystem corruption may require a suitable repair tool, normally after the filesystem is unmounted. Do not run repair commands on the wrong partition.
  • Unsupported filesystems require the appropriate kernel support or user-space helper.
  • Repeated I/O errors, disconnects, or missing devices can indicate cable, power, or hardware failure. Avoid repeated writes and preserve recoverable data.

The normal command-line workflow is: connect the device, identify the correct partition, inspect its filesystem and mount state, create a mount point, mount the partition, access files through that directory, unmount it cleanly, and then remove the drive.