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 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

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 12 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
12 comments… add one
  • Aniljalela Oct 25, 2007 @ 4:06

    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/


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

    Linux system administrator

  • alex Apr 5, 2008 @ 1:47

    teach me how to use linux for networking

  • Naba Apr 29, 2008 @ 12:14

    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.

  • ratsarsed May 18, 2008 @ 19:23

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


  • Toby Feb 19, 2009 @ 7:02

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

  • Brian Apr 29, 2011 @ 16:20

    If you want to extract ISOs via command line, use 7zip.


    7z e -r myiso.iso “/path”

    This negates the need for mounting the iso (requires root access) and can be done without using the GUI for scripting purposes. Since 7zip is available on most platforms, MacOS, Windows, and *NIX are all supported.

  • Steven Jul 6, 2011 @ 9:39

    > mount -o loop file.iso /users/steven/backup/isodir
    mount: only root can do that

    Is there some other way to show the listing of the iso file?

  • Balaji Jan 28, 2013 @ 10:02

    hii frnds..

    I need motheboard drivers for my dell inspiron laptop

    can anyone help mee

  • jhogan Mar 7, 2013 @ 15:27

    To get Brian’s 7z example to work on my system (Cygwin), I have to do the following:

    7z e my.iso -o/tmp/output-dir

    Consider using x instead of e (see the man page). The man page advises against using the -r flag (without explaining why) – it doesn’t seem to be necessary anyway. The -o flag must have no spaces between it and the argument.

    Despite the flaky UI and documentation, 7z has always worked for me in extracting ISO’s – and I’ve used it a lot.

  • Dharam Aug 22, 2016 @ 18:05

    when I am mounting an ISO getting message.

    # sudo mount -o loop /home/rhel-server-6.4-x86_64-dvd_1.iso /mnt/iso/
    mount: you must specify the filesystem type

    need support

    • 🐧 Vivek Gite Aug 23, 2016 @ 15:36


      sudo mount -t iso9660 -o loop /home/rhel-server-6.4-x86_64-dvd_1.iso /mnt/iso/
  • vaibhav yadav Jan 9, 2017 @ 18:01

    While using yum repository an error occurs base url is invalid hiw to remove this error ..

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum