VMware ESXi and vSphere Cluster Management
How to Manually Mount a USB Drive in Linux
Learn how to identify a USB partition, mount it manually in Linux, access files, use filesystem options, unmount safely, and configure optional UUID-based fstab entries.
Linux can access USB storage from the terminal even when a desktop environment does not mount it automatically. The general process is: identify the correct device, identify its filesystem-bearing partition, create a mount point, mount the partition, use the files, and unmount it before disconnecting.
USB mounting explained
A physical USB drive is the hardware you plug into the computer. Linux represents disk-like storage with a block device, a device file commonly found under /dev. A USB drive might receive a name such as /dev/sdb.
A drive can contain one or more partitions. A partition is a subdivision of the device and may contain a filesystem, such as ext4, vfat, exFAT, or NTFS. For example, the whole device may be /dev/sdb, while its first partition is /dev/sdb1. Usually, the partition—not the whole disk—is what you mount.
Mounting attaches a filesystem to a directory in the Linux directory tree. That directory is the mount point. If /dev/sdb1 is mounted at /mnt/usb, its files become available below /mnt/usb.
/dev/sdb physical USB disk represented as a block device
└── /dev/sdb1 partition containing a filesystem
└── /mnt/usb mount point through which its files are accessed
Desktop environments often mount removable media automatically through services such as udisks. They may choose a path under /media or /run/media. Manual mounting uses commands such as mount and lets you select the mount point yourself.
Connect the USB drive and observe detection
- Open a terminal and list the current block devices before connecting the drive:
lsblk -f
- Plug in the USB drive, wait briefly, and run the command again. Compare the two outputs. A new disk, partition, filesystem, label, or UUID should appear.
- Alternatively, watch kernel messages while reconnecting the device:
sudo dmesg --follow
Recent messages commonly show USB detection and a dynamically assigned name such as sdb. Device letters are assigned according to the current detection order. The same drive can be /dev/sdb on one boot and /dev/sdc on another, so never reuse a device name from an example without verifying it.
Identify the correct device and partition
Use filesystem information, size, label, UUID, and mount status together. A useful detailed listing is:
lsblk -o NAME,SIZE,FSTYPE,LABEL,UUID,MOUNTPOINTS,RM
The RM column commonly indicates whether Linux considers the device removable. Check that the size and label match the USB drive you connected, and determine which child partition has a filesystem type. Do not rely only on the name or removable flag.
Supporting commands provide additional detail:
sudo fdisk -l
sudo blkid
fdisk displays partition tables and device sizes. blkid reports filesystem types, labels, and identifiers. Before using mount, formatting, partitioning, or repair commands, confirm the target carefully. Selecting another disk can expose its files or cause data loss.
| Command | Purpose | Typical information or result | Safety notes |
|---|---|---|---|
lsblk -f | List block devices and filesystems | Names, filesystem types, labels, UUIDs | Read-only inspection; verify the correct device |
sudo fdisk -l | Display partition tables | Disk sizes, partitions, partition types | Do not use partition-changing commands until identity is confirmed |
sudo blkid | Read filesystem identifiers | TYPE, UUID, and LABEL | Use identifiers to distinguish similar devices |
findmnt | Show mounted filesystems | Source, target, type, and options | Useful for checking whether a mount point is already occupied |
Create and choose a mount point
Choose an empty directory. A conventional temporary location is /mnt/usb:
sudo mkdir -p /mnt/usb
ls -la /mnt/usb
Do not mount over a directory containing files you need to access. Those files are hidden while the filesystem is mounted and reappear after unmounting. A system-wide location under /mnt normally requires administrative privileges to create or manage. A user-owned directory, such as ~/usb, may be more convenient when you control its permissions.
Mount the USB filesystem
Replace /dev/sdX1 with the verified partition name:
sudo mount /dev/sdX1 /mnt/usb
With no -t option, mount normally detects the filesystem type. Elevated privileges are generally needed for a mount point under /mnt. Some desktop or policy configurations allow a regular user to mount removable media, but do not assume that behavior for a manually created system directory.
If automatic detection fails, specify the type after confirming it with lsblk -f or blkid:
sudo mount -t vfat /dev/sdX1 /mnt/usb
sudo mount -t exfat /dev/sdX1 /mnt/usb
sudo mount -t ntfs /dev/sdX1 /mnt/usb
sudo mount -t ext4 /dev/sdX1 /mnt/usb
For an unfamiliar or potentially damaged filesystem, inspect it without writing:
sudo mount -o ro /dev/sdX1 /mnt/usb
FAT-family filesystems do not store Unix ownership and permission metadata in the same way as ext4. Mount options provide the apparent owner and permissions. For example, replace the numeric IDs with those for the intended user and group:
id
sudo mount -t vfat -o uid=1000,gid=1000,umask=022 /dev/sdX1 /mnt/usb
sudo mount -t exfat -o uid=1000,gid=1000,umask=022 /dev/sdX1 /mnt/usb
NTFS support and option names depend on the driver installed by the distribution. Ownership mapping may use options such as uid, gid, and umask with the available NTFS driver. Follow the driver’s local documentation rather than assuming every NTFS implementation accepts identical options. Linux-native filesystems such as ext4 preserve Unix ownership and mode bits stored on the filesystem.
Confirm the mount
findmnt /mnt/usb
mount | grep /mnt/usb
lsblk -f
df -h /mnt/usb
A successful result shows the verified partition attached to /mnt/usb. If the mount point was already used, the output can help reveal what is currently mounted there.
Use the mounted drive
cd /mnt/usb
ls -la
cp ~/Documents/report.txt .
mkdir backups
cp -a ~/Pictures backups/
df -h .
Use ordinary file commands after mounting. df -h reports space for the filesystem containing the specified path. Writes can fail because the medium is read-only, the filesystem was mounted with ro, the filesystem has an error, or the current user lacks permission. Check the mount options with findmnt and inspect ownership and mode information.
After writing, flush pending data before removal:
sync
Unmount and safely remove the device
The command is spelled umount, not unmount:
sudo umount /mnt/usb
You can also identify the mounted partition and unmount it by device:
sudo umount /dev/sdX1
Verify that it is no longer mounted:
findmnt /mnt/usb
lsblk -f
No filesystem should be listed at that mount point. Only then disconnect the drive. On systems that support it, a desktop eject action or a udisks-based power-off operation can also prepare removable hardware for removal. Clean unmounting is the essential step because it flushes filesystem metadata and pending writes.
Fixing a “target is busy” error
A busy target means a process still uses the filesystem. A shell whose current directory is inside /mnt/usb is a common cause.
cd ~
sudo lsof +f -- /mnt/usb
sudo fuser -vm /mnt/usb
Close files and applications, exit file-manager windows, stop relevant indexers, and change every shell away from the mount point. Then retry a normal umount. Do not force an unmount while important writes may still be active.
Common USB filesystems
| Filesystem | Linux support considerations | Permission behavior | Useful mount options |
|---|---|---|---|
| vfat/FAT32 | Widely supported; common on interoperable removable media | Does not preserve native Unix ownership and modes | uid, gid, umask, ro |
| exFAT | Usually supported by current distributions; older systems may need support installed | Ownership and modes are supplied at mount time | uid, gid, umask, ro |
| NTFS | Requires an available NTFS driver; support and options vary | Driver-dependent; ownership can often be mapped | uid, gid, umask, ro |
| ext4 | Native Linux filesystem | Stores Unix ownership, modes, and permissions | ro, nosuid, nodev where appropriate |
| ISO9660 | Common for optical-disc images and some read-only media | Usually read-only and limited compared with a normal writable filesystem | ro, driver-specific ownership mapping |
Optional persistent mounting with /etc/fstab
/etc/fstab is the system configuration file for filesystem mount rules. Avoid using /dev/sdX1 in a persistent entry because device letters can change across boots. Prefer a filesystem UUID or a carefully chosen LABEL:
sudo blkid /dev/sdX1
lsblk -f
Back up the file before editing it:
sudo cp -a /etc/fstab /etc/fstab.backup
Create the mount point and edit the file with your preferred administrative editor. An optional removable-media entry can look like this:
UUID=YOUR-UUID /mnt/usb auto noauto,nofail,user 0 0
For a FAT-family filesystem with ownership mapped to user and group ID 1000:
UUID=YOUR-UUID /mnt/usb vfat noauto,nofail,user,uid=1000,gid=1000,umask=022 0 0
| Field number | Field name | Purpose | Example value |
|---|---|---|---|
| 1 | Source | Device, UUID, or LABEL to mount | UUID=YOUR-UUID |
| 2 | Mount point | Directory where the filesystem appears | /mnt/usb |
| 3 | Filesystem type | Filesystem driver or automatic detection | auto or vfat |
| 4 | Options | Comma-separated mount behavior | noauto,nofail,user |
| 5 | Dump | Legacy dump-backup field | 0 |
| 6 | fsck pass | Filesystem-check ordering at boot | 0 |
noauto prevents automatic mounting during normal mount -a; the drive can be mounted explicitly by its mount point. nofail tells boot processing not to treat an absent optional drive as a fatal failure. user allows the user who mounts the entry to unmount it; users permits a broader set of users and should be chosen deliberately.
Before rebooting, validate the syntax:
sudo mount -a
findmnt /mnt/usb
Because noauto entries are skipped by mount -a, either temporarily omit noauto while testing, or test the entry directly:
mount /mnt/usb
findmnt /mnt/usb
sudo umount /mnt/usb
Replace the placeholder UUID and verify the filesystem type and options. An incorrect required fstab entry can cause boot delays or prevent normal boot behavior. Keep the backup and know how to edit or revert the file from a recovery shell before making changes.
Troubleshooting
| Symptom | Likely cause | How to diagnose | Resolution |
|---|---|---|---|
USB does not appear in lsblk | Connection, port, cable, power, kernel detection, or device failure | Reconnect while watching sudo dmesg --follow; test another port or computer | Correct the connection or power issue; replace a malfunctioning device |
Expected /dev/sdX1 name differs | Dynamic device-letter assignment | Compare size, label, UUID, filesystem, and kernel messages | Use the verified current name; never guess it |
| Unknown filesystem type or missing helper | Missing support, wrong partition, or filesystem damage | Check TYPE with lsblk -f or blkid | Install appropriate support, select the filesystem-bearing partition, and consider read-only inspection |
| Permission denied | Directory permissions, ownership mapping, or read-only mount | Use findmnt; inspect options and directory permissions | Use suitable uid, gid, and umask options where applicable; investigate ro |
umount says target is busy | Shell, application, file manager, or indexer uses the drive | Run sudo lsof +f -- /mnt/usb or fuser | Change directories, close users of the drive, and retry normally |
fstab entry fails | Wrong UUID, path, type, option, absent drive, or unstable device path | Compare with blkid; run sudo mount -a when appropriate | Use UUID or LABEL, ensure the directory exists, and add nofail for optional media |
Safety checklist
- Confirm the drive identity before mounting, partitioning, formatting, repairing, or writing.
- Use size, label, filesystem type, UUID, and recent detection messages—not a guessed device letter.
- Mount read-only when inspecting uncertain or potentially damaged media.
- Run
syncafter writes, then unmount cleanly before physically disconnecting. - Back up
/etc/fstab, validate changes, and maintain a recovery path before rebooting.