How To List and Mount ISO Files In Linux
ISO image is an archive file generally used for optical disks. ISO image uses file system ISO 9660 and have extension .iso or .image . ISO images can be written into CD, DVD, Blu-ray . ISO file are very popular way to distribute files, Linux distributions, media files etc.
List ISO Image Content
We may want to list content of ISO image and check if the content we are looking for exist. Libcdio-utils is package that provides tool named iso-info where we will use to list ISO image content. We can install libcdio-utils like below.
1 |
$ sudo apt-get install libcdio-utils -y |

Syntax of the isoinfo is like below.
1 |
$ isoinfo [OPTIOMS] -i FILENAME |
At this stage we will use memtest86+.iso file which is by default provided from Ubuntu, Debian to use boot operations.
1 |
$ isoinfo -l -i /usr/lib/memtest86+/memtest86+.iso |

isoinfo list files and directories like ls -Rl command. Say we want to get /README.TXT file.
Mount ISO Image
We will mount iso image with mount command . Mount command automatically detects file system of the ISO image and provides related options implicitly. We first install isoinfo like below.We will create new directory to mount our ISO image. We can prefer to use existing directories like /cdrom or /mnt too.
1 |
$ mkdir iso |
Now we can mount iso file. We need root privileges to mount iso file. And mounted iso file directory will be read only by default because the aim is to read files.
1 |
$ sudo mount /usr/lib/memtest86+/memtest86+.iso iso |

Unmount Mounted ISO
We need to unmount after we completed our work with ISO file. Actually we have no obligation but neat way is unmounting ISO file from mounted path. We can use umount
command by providing the path we all ready mount. We also generally need the root privileges with sudo
command. In this example we will unmount path /mnt
.
1 |
$ sudo umount /mnt |