29

I have some ISO images and would like to extract them to a hard-disk. They are not OS images, I think they are music or audio books, I Don't know until they are extracted. Thanks

7 Answers7

30
sudo apt-get install p7zip-full
7z x disk.iso

See also: https://unix.stackexchange.com/questions/70738/what-is-the-fastest-way-to-extract-an-iso

See also:

Tested in Ubuntu 18.04 with the Ubuntu 18.04 ISO itself: ubuntu-18.04.1-desktop-amd64.iso.

  • 4
    This is an actual answer. Others just tell to mount and then copy. I can even burn a CD , climb on eiffel tower, wear a blindfold, and copy the contents, while standing on my head, but that's not the point. If there is such a simple command "7z x". Why bother with all that complication? – Sahil Singh Sep 21 '16 at 13:31
  • 7z doesn't preserve permissions when extracting an ISO – mheyman Sep 27 '17 at 11:36
  • 1
    @mheyman thanks for the report. And mount does is that correct? If that is the case it would be good to have a link to a feature request in their tracker. – Ciro Santilli OurBigBook.com Sep 27 '17 at 12:38
  • 1
    Mounting as a loopback always works assuming you have the proper permissions and file system. The only robust non-mounting way I've found is using https://www.gnu.org/software/xorriso/ (there are usually packages available). Just make sure to use the -file_name_limit 253 option when extracting. For some reason it defaults to 64 which isn't long enough for may ISOs. (I've also had problems with file name lengths using 7z). – mheyman Sep 28 '17 at 16:51
  • 1
    Late to the party but the current version of 7z expects 'e' as a parameter for extracting the iso. – gnzg May 03 '22 at 15:34
  • How can I use this to extract the image in a different directory? – Mehdi Charife Feb 26 '23 at 07:04
  • @MehdiCharife doesht 7z x path/to/disk.iso work? – Ciro Santilli OurBigBook.com Feb 26 '23 at 07:22
  • @CiroSantilliOurBigBook.com It should, but I'm thinking of extracting the image in a directory that is different from the one in which the .iso file resides. – Mehdi Charife Feb 26 '23 at 07:27
  • 2
    @MehdiCharife OK. man 7z says there's an -o option "Set Output directory", untested. – Ciro Santilli OurBigBook.com Feb 26 '23 at 07:32
  • @CiroSantilliOurBigBook.com The command 7z x -o /media/mehdi/7A70-A177/ kubuntu-22.10-desktop-amd64.iso gives the error Command Line Error: Too short switch: -o – Mehdi Charife Feb 26 '23 at 08:34
  • 1
    @CiroSantilliOurBigBook.com Oddly (ot not), removing the space between -o and the path of the destination fix the issue: 7z x -o/media/mehdi/7A70-A177/ kubuntu-22.10-desktop-amd64.iso. – Mehdi Charife Feb 26 '23 at 08:40
  • 1
    @MehdiCharife ah, their CLI interface if a bit wonky it seems! – Ciro Santilli OurBigBook.com Feb 26 '23 at 09:04
29

If you are comfortable with the command line you can make use of the loop-back device.

All you'll need is an empty folder, so either use an existing one or create an new one:

mkdir test_folder

then run:

sudo mount -o loop,ro -t iso9660 filename.iso test_folder

If you are not sure about the filesystem type of the .iso, your system might be able to auto-detect it. This works on Ubuntu 18.04 with the Ubuntu installation ISOs for example:

sudo mount filename.iso test_folder

Now you can just cd test_folder or just ls test_folder to see the contents. No need to extract anything.

To "remove" the .iso, just type:

umount /path/to/test_folder
hmayag
  • 2,246
  • 5
  • 21
  • 23
4

In Ubuntu, you can open them in Archive Manger: enter image description here
You can add files .isos, and extract them.

To open it, right-click on the file and select Open With →, and Archive Manager. If the option is available, you can also mount the .iso image as though it was a disc in the computer.

If it is not installed (it should be, I think it is part of the desktop), use this:

sudo apt-get install file-roller

You may also get an option to right-click and Extract Here to extract the contents of the iso files, and other compressed files.

Wilf
  • 30,194
  • 17
  • 108
  • 164
  • 1
    file-roller fails to extract files larger than 2GB (file-roller uses isoinfo/isoread code and that code has a signed 32-bit integer used for the size of the file in bytes that overflows at 2GB) – mheyman Sep 27 '17 at 11:39
1

7z has a bug that truncates file names longer than 64 characters so I used CMake instead:

cmake -E tar xf filename.iso

(but any other libarchive-based tool should work, including bsdtar)

nocnokneo
  • 393
0

Easyest way to extract iso file in linux is

Open terminal and type

sudo su root

enter your password then type

mount -t auto -o loop "Path/location to iso" /where u want to mount

0

There is no official application to handle ISO-files on a Ubuntu plasma desktop environment, like Ubuntu Studio.

You can install Double Commander and extract an ISO directly using your mouse with right click: extract here.

dschoni
  • 89
-1

Wikipedia:https://en.wikipedia.org/wiki/AcetoneISO

AcetoneISO is often referred to as the Daemon Tools equivalent for GNU/Linux. This mighty software can mount ISO, MDF, BIN and NRG files and burn ISO images to optical discs. It supports file conversion from BIN, MDF, NRG, DAA, IMG, DMG, CDI and other formats to ISO, as well as extracting content from them. You can use it to create ISO images from files and folders on your computer, as well as to encrypt and decrypt existing images, it has also the ability to split big image files, or to merge two or more smaller ones, this software is under the GPL License.

I didn't test it myself.