How to Mount a USB or External Drive on Linux
Learn to mount and unmount external drives on Linux, from the desktop and from the terminal.
If you use a graphical desktop (GNOME, KDE, Cinnamon...), you probably don't need any of this: plug in the USB and click on it inside File Explorer — it mounts itself. This article is for when you don't have a graphical desktop (a server, a headless Raspberry Pi) or prefer to do it from the terminal.
1. Identify the device
sudo fdisk -l
Find your USB by its size — it usually shows up as
/dev/sdb1 or similar (the internal disk is usually
/dev/sda).
2. Create a mount point
sudo mkdir /mnt/myusb
3. Mount it
sudo mount /dev/sdb1 /mnt/myusb
You can now access its content by navigating to
/mnt/myusb.
4. Unmount it (before removing it physically)
sudo umount /mnt/myusb
Warning: always unmount before physically removing the USB. Removing it while mounted can corrupt data that hadn't been fully written to the device yet.
Mounting it automatically every time you connect it
Get the device's UUID:
sudo blkid
Add a line to /etc/fstab with that UUID — from then
on, it will mount itself at boot if it's connected.
Frequently asked questions
Do I need to use the terminal to mount a USB if I have a graphical desktop?
No, with a normal desktop environment (GNOME, KDE, Cinnamon), just plugging it in and clicking in File Explorer is enough. The terminal is mainly needed on systems without a graphical interface.
Why should I unmount before removing the USB?
Because there may be data the system hasn't finished physically writing to the device yet — removing it without unmounting can corrupt it.