How to: Extract files from ISO CD images in Linux

Under many situations you may need to get a single file/many files from Linux ISO image.

You can mount ISO images via the loop device. You need to use mount command. First login as a root user:

Extract File(s) Under Linux OS

Let us assume that your ISO image name is disk1.iso.

Step # 1: First you need to create a directory /mnt/iso

# mkdir /mnt/iso
# mount -o loop disk1.iso /mnt/iso

Step # 3: Extract file

Now you can easily copy file called file.txt from iso disk image to /tmp directory :

# cd /mnt/iso
# cp file.txt /tmp

Step # 4: Copy foo.rpm from ISO disk image:

# cd /mnt/iso/RedHat/RPMS
# cp foo.rpm /tmp 

Extract File(s) Under Windows XP or Vista Os

Windows do not have in built capability as provided by Linux to extract file. Luckly many third party software exist my favorite is Winimage http://www.winimage.com/. Download trial version (I’m sure you will love to registered this tiny utility later):

1) Install Winimage software

2) Just double click on Linux ISO file

3) Select the desired file and hit CTRL + X (or from Image menu select extract)

For more information read man pages:

man cp
man mv
man rpm
man mount
man mkdir
Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 5 comments… read them below or add one }

1 Aniljalela 10.25.07 at 4:06 am

Hello there,

some time we can not extract DVD iso using this command such as vista dvd iso. it is never properly extract using this command also we can not properly extract using magiciso or other tool. my point is some iso create using ISO13346 and Linux Kernel 2.4.* not support ISO13346.

mount -o loop -t iso9660 debian-sid.iso /mnt/isoimage/

and

In GUI mount-iso-image-0.9 is best tool for mount iso images

aniljalela
Linux system administrator

2 alex 04.05.08 at 1:47 am

teach me how to use linux for networking

3 Naba 04.29.08 at 12:14 pm

Dear sir,
I have my Pc install Linux 8 and windows Xp. I have access to windows device. I have write to comment mount d but the erroe “Special device /dev/hda5 does not exist plz. help me.

4 ratsarsed 05.18.08 at 7:23 pm

I need to extract >4gig of files.
Copying them one at
a time is no solution. ? How to
extract all ?

Cheers

5 Toby 02.19.09 at 7:02 am

In Linux just ‘right-click’ > “Extract Here”. There is no need to mount first.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tagged as: , , , , , , , , , , , , , , , , , , ,

Previous post: How to force sshd server to display login banner before login (change the ssh server login banner)

Next post: Linux/ FreeBSD GNU GCC Common option for C compiler