USB drive won't auto-mount on Linux? Try this fix

USB not mounting automatically? Usually a missing udev rule or stale mount point. Here's how to fix it fast.

Quick answer

Run sudo udisksctl mount -b /dev/sdX1 (replace X with actual device) to mount it now. Then check udev rules and udisks2 service for permanent fix.

Why this happens

Most Linux distros rely on udisks2 and udev to auto-mount USB drives. When it fails, the culprit is almost always one of three things: stale mount points from a previous unclean eject, a missing or broken udev rule, or udisks2 service not running. I've seen this on Ubuntu 22.04, Fedora 39, and Debian 12 after systemd updates. Don't bother reinstalling desktop environment — that rarely helps.

Step-by-step fix

1. Check if the device is detected

First, look for your USB drive in the system. Run this:

lsblk -o NAME,SIZE,TYPE,MOUNTPOINT

If you see sdb1 or sdc1 without a mountpoint, the drive is detected but not mounted. If you don't see it at all, try sudo dmesg | tail -20 — you might see USB errors like "device descriptor read/64, error -71". That means a hardware issue. Try a different USB port.

2. Mount it manually with udisksctl

If the device shows up in lsblk, mount it manually:

sudo udisksctl mount -b /dev/sdb1

Replace sdb1 with your device partition. This should work without checking udev rules. If you get "Error looking up object for device", udisks2 probably isn't running. Start it with:

sudo systemctl start udisks2.service

3. Check udisks2 service status

Make sure udisks2 is enabled and running:

sudo systemctl status udisks2.service

If it's dead or masked, reinstall it:

sudo apt install --reinstall udisks2  # Debian/Ubuntu
sudo dnf reinstall udisks2             # Fedora

4. Clean stale mount points

A common issue: old mount folders left behind from a previous session. Check /media/yourusername/ for empty folders. Delete them:

sudo rmdir /media/yourusername/*

If a folder won't delete, reboot first. After that, plug the USB in again — it should auto-mount.

5. Check udev rules for USB storage

A missing or broken udev rule can block auto-mount. Look at existing rules:

ls /etc/udev/rules.d/ | grep -i usb

If you see something like 99-usb-automount.rules, that might be overriding defaults. Rename it and reload udev:

sudo mv /etc/udev/rules.d/99-usb-automount.rules /etc/udev/rules.d/99-usb-automount.rules.bak
sudo udevadm control --reload-rules
sudo udevadm trigger

6. Test with a different filesystem

If none of that works, try formatting the USB to something simple like FAT32 or ext4. NTFS and exFAT might need extra packages (ntfs-3g, exfat-utils). On Ubuntu:

sudo apt install exfat-utils ntfs-3g

Alternative fix: Use systemd automount

If udisks2 still won't cooperate, create a systemd automount unit. This is advanced but stable. Create /etc/systemd/system/media-usb.mount:

[Unit]
Description=USB drive mount

[Mount]
What=/dev/sdb1
Where=/media/usb
Type=vfat
Options=defaults,noatime,uid=1000,gid=1000

[Install]
WantedBy=multi-user.target

Then create /etc/systemd/system/media-usb.automount:

[Unit]
Description=USB drive automount

[Automount]
Where=/media/usb

[Install]
WantedBy=multi-user.target

Enable it: sudo systemctl enable media-usb.automount && sudo systemctl start media-usb.automount. Now plugging the USB into the same port will auto-mount it.

Prevention tip

Always safely eject USB drives before unplugging. Use udisksctl unmount -b /dev/sdb1 or the GUI eject button. Stale mounts from unclean disconnects are the #1 cause of auto-mount failures. Also, keep your system updated — kernel updates often fix USB stack bugs.

Related Errors in Linux & Unix
Linux 'Permission denied' on mount: fix it fast Permission denied (publickey) Fix Git 'Permission Denied Publickey' Clone Error on Linux Permission denied (publickey) Permission Denied (publickey) in SSH: Real Fix for Linux Linux Mount Point Missing in /etc/fstab? Here's the Fix

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.