If you want to extract files from an ISO image file, what you can do is to mount the ISO image file via the loop device. Once an ISO image file is mounted, any file inside the ISO image can be read or updated via file system interface.
To extract files from an ISO image file from the command line:
$ cp ./mount_iso/file.jpg /tmp
Alternatively, you can use a desktop application called Gmount-iso which provides GUI for (un)mounting ISO images. To install and start Gmount-iso on Ubuntu or Debian:
$ sudo Gmount-iso
The screenshot of Gmount-iso is shown below.
Once you mount an ISO image file, you can not only extract files from it, but also add/modify files in the ISO image as you wish.
However, the downside of mounting an ISO image file is that it requires root privilege. If you want to extract files from an ISO image without root privilege, there are several ways to do it.
On Ubuntu Desktop, extracting files from an ISO image is no-brainer, since Nautilus, Ubuntu's default file manager, supports ISO file extraction. Open up Nautilus, and go to the folder where an ISO image is located. Right click the ISO image file, and choose "Extract Here" menu. Then the content in the ISO image will be extracted into a directory created in the current location.
If you don't have X11 desktop environment, but only have command-line interface, you can use 7zip to extract ISO image files.
Once 7zip is installed, you can use 7z command to extract files inside an ISO image file as follows. In this example, the command extracts files and all subdirectories in "disk.iso" into "/home/xmodulo/archive" output directory.
Subscribe to Xmodulo
Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.