How to Mount and Unmount File Systems in Linux

In Linux and Unix-like systems, the mount command attaches file systems and removable devices such as USB drives to a mount point in the directory tree. The umount command detaches them when you are done.
This guide explains how to mount and unmount file systems in Linux using the mount and umount commands, including USB drives, ISO files, NFS shares, and persistent /etc/fstab entries.
How to List Mounted File Systems
When used without any argument, the mount command will display all currently attached file systems:
mountBy default, the output will include all file systems including the virtual ones such as cgroup, sysfs, and others. Each line contains information about the device name, the directory to which the device is mounted, the type of the filesystem, and the mount options in the following form:
device_name on directory type filesystem_type (options)To display only certain file systems, use the -t option.
For example, to print only the ext4 partitions you would use:
mount -t ext4Mounting a File System
To mount a file system in a given location (mount point), use the mount command in the following form:
mount [OPTION...] DEVICE_NAME DIRECTORYOnce the file system is attached, the mount point becomes the root directory of the mounted file system.
For example, to mount the /dev/sdb1 file system to the /mnt/media directory you would use:
sudo mount /dev/sdb1 /mnt/mediaUsually when mounting a device with a common file system such as ext4 or xfs, the mount command will auto-detect the file system type. However, some file systems are not recognized and need to be explicitly specified.
Use the -t option to specify the file system type:
mount -t TYPE DEVICE_NAME DIRECTORYTo specify additional mount options
, use the -o option:
mount -o OPTIONS DEVICE_NAME DIRECTORYMultiple options can be provided as a comma-separated list (do not insert a space after a comma).
You can get a list of all mount options by typing man mount in your terminal.
Mounting a File System using /etc/fstab
When providing just one parameter (either directory or device) to the mount command, it will read the content of the /etc/fstab configuration file to check whether the specified file system is listed or not.
If the /etc/fstab contains information about the given file system, the mount command uses the value for the other parameter and the mount options specified in the fstab file.
The /etc/fstab file contains a list of entries in the following form:
[File System] [Mount Point] [File System Type] [Options] [Dump] [Pass]Use the mount command in one of the following forms to attach a file system specified in the /etc/fstab file:
mount [OPTION...] DIRECTORY
mount [OPTION...] DEVICE_NAMEMounting USB Drive
On most modern Linux distributions, USB drives will auto-mount when you plug them in, but sometimes you may need to manually mount the drive.
To manually mount a USB device, perform the following steps:
Create the mount point:
Terminalsudo mkdir -p /media/usbTo find the device name and filesystem type, use one of the following commands:
Terminallsblk fdisk -l dmesgAssuming that the USB drive uses the
/dev/sdd1device, mount it to the/media/usbdirectory:Terminalsudo mount /dev/sdd1 /media/usb
To mount exFAT formatted USB drives, install the free FUSE exFAT module and tools .
Mounting ISO Files
You can mount an ISO file using the loop device, which is a special pseudo-device that makes a file accessible as a block device.
Start by creating the mount point, it can be any location you want:
Terminalsudo mkdir /media/isoMount the ISO file to the mount point by typing the following command:
Terminalsudo mount /path/to/image.iso /media/iso -o loopReplace
/path/to/image.isowith the path to your ISO file.
Mounting NFS
To mount an NFS share , you will need to have the NFS client package installed on your system.
Install NFS client on Ubuntu, Debian, and Derivatives:
Terminalsudo apt install nfs-commonInstall NFS client on Fedora, RHEL, and Derivatives:
Terminalsudo dnf install nfs-utils
Use the steps below to mount a remote NFS directory on your system:
Create a directory to serve as the mount point for the remote filesystem:
Terminalsudo mkdir /media/nfsGenerally, you will want to mount the remote NFS share automatically at boot. To do so, open the
/etc/fstabfile with your text editor :Terminalsudo nano /etc/fstabAdd the following line to the file, replacing
remote.server:/dirwith the NFS server IP address or hostname and the exported directory:/etc/fstabini# <file system> <dir> <type> <options> <dump> <pass> remote.server:/dir /media/nfs nfs defaults 0 0Mount the NFS share by running the following command:
Terminalsudo mount /media/nfs
Creating a Mount Point
Before you mount a file system manually, the target directory must already exist. This directory is called the mount point.
To create a mount point, use mkdir:
sudo mkdir -p /mnt/dataUnmounting a File System
To detach a mounted file system, use the umount command followed by either the mount point directory or the device name:
umount DIRECTORY
umount DEVICE_NAMEIf the file system is in use, the umount command will fail to detach it. In those situations, you can use the fuser command to find out which processes are accessing the file system:
fuser -m DIRECTORYOnce you determine the processes, you can stop them and unmount the file system.
Lazy Unmount
Use the -l (--lazy) option to unmount a busy file system as soon as it is no longer in use:
umount -l DIRECTORYForce Unmount
Use the -f (--force) option to force an unmount. This option is usually used to unmount an unreachable NFS system:
umount -f DIRECTORYForce unmounting is generally not a good idea, as it may corrupt data on the file system.
Quick Reference
| Command | Description |
|---|---|
mount | List all mounted file systems |
mount -t ext4 | List mounted file systems of a specific type |
sudo mount DEVICE DIR | Mount a device to a directory |
sudo mount -t TYPE DEVICE DIR | Mount with an explicit file system type |
sudo mount -o OPTIONS DEVICE DIR | Mount with specific options |
sudo mount DIR | Mount using /etc/fstab entry |
sudo mount /dev/sdd1 /media/usb | Mount a USB drive |
sudo mount /path/to/image.iso /media/iso -o loop | Mount an ISO file |
umount DIRECTORY | Unmount by mount point |
umount DEVICE_NAME | Unmount by device name |
umount -l DIRECTORY | Lazy unmount (detach when not busy) |
umount -f DIRECTORY | Force unmount (use with caution) |
fuser -m DIRECTORY | Find processes using a mount point |
lsblk | List block devices and their mount points |
Troubleshooting
“Permission denied” when mounting
The mount command requires root privileges. Prefix the command with sudo, or add the device to /etc/fstab with the user option to allow non-root mounts.
“Device or resource busy” when unmounting
A process is still accessing the file system. Run fuser -m DIRECTORY to identify the processes, then stop them before retrying umount. Alternatively, use umount -l for a lazy unmount.
“Wrong fs type, bad option, bad superblock”
The file system type was not detected correctly. Specify it explicitly with the -t flag: sudo mount -t ext4 /dev/sdb1 /mnt/data.
Mount does not persist after reboot
Mounts made with mount are not persistent. To mount a file system automatically at boot, add an entry to /etc/fstab.
“Can’t read superblock” on USB drive The drive may use a file system not supported by default (for example, exFAT). Install the required kernel module or FUSE driver, then retry the mount.
FAQ
What is the difference between mount and umount?
mount attaches a file system to a directory in the tree, making its contents accessible at that path. umount detaches it, making the directory empty again.
Why is the command umount and not unmount?
The command has been spelled umount since early Unix — it is a historical convention, not a typo.
How do I make a mount persistent across reboots?
Add an entry to /etc/fstab. The format is: DEVICE MOUNTPOINT FSTYPE OPTIONS DUMP PASS. After editing the file, run sudo mount -a to test that all entries mount without errors.
What is a mount point in Linux? A mount point is a directory where a file system is attached and made accessible. After mounting, the mounted file system appears under that directory path.
How do I find the device name of a connected drive?
Run lsblk to list all block devices and their mount points. You can also use fdisk -l or check dmesg output right after plugging in the device.
Can I mount a directory to another directory?
Yes, using a bind mount: sudo mount --bind /source/dir /target/dir. This makes the contents of the source directory accessible at the target path without duplicating any data.
Conclusion
The mount command is the primary tool for attaching file systems in Linux, from local partitions and USB drives to ISO images and NFS shares. Use /etc/fstab to make mounts persistent across reboots, and umount to safely detach them when done. For NFS-specific setup, see the NFS mount guide
.
Tags
Linuxize Weekly Newsletter
A quick weekly roundup of new tutorials, news, and tips.
About the authors

Dejan Panovski
Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 800+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.
View author page