How to Mount and Unmount Filesystems with mount and umount

Published 2026-08-05 · Learn Linux

The mount command attaches a filesystem (like a USB stick or a second disk) to a directory, and umount detaches it. sudo mount /dev/sdb1 /mnt makes the drive available at /mnt. Both need root, so they are prefixed with sudo.

Find the device with lsblk

Before mounting, identify the drive. lsblk lists disks and partitions with their device names like sdb1.

$ lsblk

Mount a device

Create a mount point directory, then mount the device to it. Everything under that directory is now the drive's contents.

$ sudo mkdir -p /mnt/usb
$ sudo mount /dev/sdb1 /mnt/usb

See what is mounted

Run mount with no arguments to list everything attached, or check free space per filesystem with df -h, which shows the mount point for each disk.

$ df -h

Unmount safely with umount

Always unmount before unplugging a USB drive, or writes may be lost. Use the mount point or the device:

$ sudo umount /mnt/usb

Handle the busy error

If umount says the target is busy, a process is using a file on the drive. Close it or use fuser -vm /mnt/usb to see who. See mount and umount for the full references.

Keep learning

Related guides: How to Check Disk Usage with df and du · How to Run Commands as Root with sudo · How to Create and Remove Directories with mkdir and rmdir. Read all tutorials on the Learn Linux blog.