Mount an ISO file in Linux

It is convenient to mount an ISO file directly instead of burning it to a CD first. This recipe describes the command used to mount an ISO image on a Linux system.


To mount the ISO image file.iso to the mount point /mnt/test use this command:

mount -o loop -t iso9660 file.iso /mnt/test

 

About Quinn McHenry

Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.

  • bob

    You fail to explain that this command only works for root.

  • http://www.sanguisdevelopment.com JOsh

    thank you, had not dont that before.

  • Amit

    unable to mount iso file using command mentioned above as each time there is a extracted directory made in test folder

  • miezebieze

    it also works without “-t iso9660″ (mount -o loop file.iso /mnt/test)… When I tried, your command doesn’t work at all…

    • http://www.laustata.lt Ruslanas Gzibovskis

      your iso image file system was another ;)

  • jesla

    works fine, how would you unmount

    • a$$hole

      umount /mnt/test

  • Nokie

    eh… it says “mount: mount point /mnt/[name] does not exist”
    wat do i do?

    • bob

      you need to create the mount point first, i.e. “mkdir /mnt/test”

      • Naveen Nishad

        mkdir -p /mnt/test

  • Lawrence

    lawrence@Inf1n1ty:~$ su
    Password:
    su: Authentication failure
    lawrence@Inf1n1ty:~$ sudo -i
    root@Inf1n1ty:~# mkdir -p /mnt/disk
    root@Inf1n1ty:~# mount -o loop BF1942_1.iso /mnt/disk
    BF1942_1.iso: No such file or directory
    root@Inf1n1ty:~#

    so when i log into root, cannot as it is locked, so use sudo to gain root privileges, Then when I go to mount the image it doesn’t find it.
    Is there a certain location that I need to place the iso in question?

    • michael

      what is the path to BF1942_1.iso relative to your current directory?

      Should something like

      mkdir -p /mnt/disk
      mount -o loop /dev/USB/BF1942_1.iso /mnt/disk
      … Make any sense?

    • mainmeat

      lawrence – you arent specifying a path for your BF1942_1.iso file.
      try
      mkdir /mnt/foo
      mount -o loop /dir/path/filename.iso /mnt/foo
      that should do the trick

      • jackwade

        When you use sudo -i to turn into root, it changes your current directory to root’s home directory, /root, so you’re no longer in your old directory where you can access the file with the relative path you were using before.

  • Anonymous

    Your recipe seems like not working. I have given the command:-

    mount -o loop -t iso9660 rld-dmc4.iso /media/Entertainment/Game/Devil May Cry 4 Image/

    And I got the o/p:-

    rld-dmc4.iso: No such file or directory

  • Anonymous

    mount: only root can do that

  • X81kilo

    thanks. and the comments below about only using root was also helpful.

  • http://twitter.com/123sale vps-hosting-online

    Not working

    • Guest

      it doesnt because they have made a daemon tools lite for linux yet.
      i “mounted an .iso and it opened like a folder not like a cd-rom. i am trying to like linux but it just does NOT measure up.

      • joe

        Linux measures up, and linux doesn’t measure up, depending on who’s using it

        it doesn’t “open like a folder,” /mnt/test would = say “E:” (or whatever your cd is on windows)

        / is just the start of your root partition, but if you look at your actual cdrom, the /cdrom(or whatever you have) is just a link to /mnt/cdrom, so there’s not really a difference between /mnt/cdrom and /mnt/test, not anymore than there is between e:(real cd drive) and f:(daemon tools fake cd drive)

        • Joe

          sorry, meant to say / is start of base system

  • Hgfd

    bunch of effing noobs – “I don’t linux! – your tutorial doesn’t work it says no such file or directory” … effing depressing.

  • Hgfd

    bunch of effing noobs – “I don’t linux! – your tutorial doesn’t work it says no such file or directory” … effing depressing.

  • Roshan

    mount -o loop /path where u r file /Mount point

  • http://hotmail.com Ace

    what to do if my direction have spaces in its name?
    like: /media/Data/Pc Isos/lala.iso
    i had to change Pc Isos to isos to make it work.
    but is there another way?

  • http://www.tech-recipes.com qmchenry

    @Ace – you can wrap any filename that has spaces with “double quotes” and the OS will treat it all as one filename. When I grab a url from the web, for example, that I’m going to download via command line with curl or wget, I always wrap my pasted content with quotes since things like ampersands really mess with unix shells.

    You can also precede a space with a backslash, so /media/Data/Pc\ Isos/lala.iso will also work, but the quotes are usually easier.

  • Slim

    root# mount -o loop (place with my file/filename).iso (place to be mounted)
    mount: you must specify the filesystem type

    I used this commant for mounting already with no problem, but this time I had just .bin file witch I converted to .iso by manualy made .cue and bchunk. Does anybody know where is problem and how can I fix it? Any idea?

  • Ganaa

    Yes, it works fine, thank you

  • saravanan R

    I am getting an error while executing the above command.Kindly help

    wrong fs type, bad option, bad superblock on /dev/loop0,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog – try
    dmesg | tail or so

  • Mozuto

    Thanks buddy!