In the past, installing a new operating system or accessing a software disk image meant finding a blank CD/DVD, inserting it into a disk drive, and waiting 20 minutes for an ISO file to burn. Today, physical optical drives are virtually extinct on modern PCs.
Fortunately, Linux has native support for treating .iso files exactly as if they were physical disks inserted into a drive. You can “mount” them directly into your file system to browse their contents, extract files, or run installers.
How to Mount an ISO File via the Terminal
The standard way to mount an ISO file in Linux is by using the built-in mount command. This method works across Ubuntu, Debian, Fedora, Arch, and almost every other distribution.
- First, you need a directory where the contents of the ISO will be displayed. It is standard practice to create a temporary folder in the
/mntdirectory. Open your terminal and run:sudo mkdir /mnt/iso - Now, use the
mountcommand. You must specify the loop device option (-o loop), which tells Linux to treat the file as a block device. Replace the path with the location of your actual ISO file:sudo mount -o loop /home/user/Downloads/ubuntu-22.04.iso /mnt/iso - You might see a warning message stating that the file system is mounted as “read-only.” This is perfectly normal, as ISO files are designed to be read-only disk images.
- You can now navigate to that directory to view the files:
cd /mnt/isols -l
How to Unmount the ISO File
Once you are finished copying files or running the installer, you should unmount the ISO to free up the system resources and allow the original .iso file to be moved or deleted.
Make sure your terminal is not currently inside the /mnt/iso directory (or the command will fail because the device is “busy”). Type cd ~ to return to your home directory, and then run:
sudo umount /mnt/iso
Note: The command is umount, not unmount.