Mount an ISO file in Linux

Contributor Icon Contributed by qmchenry  
Tag Icon Tagged: 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

 

26 Comments -


  1. bob said on October 16, 2008

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

  2. JOsh said on October 23, 2008

    thank you, had not dont that before.

  3. Amit said on November 17, 2008

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

  4. miezebieze said on November 19, 2008

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

  5. Ruslanas Gzibovskis said on January 5, 2009

    your iso image file system was another ;)

  6. jesla said on January 21, 2009

    works fine, how would you unmount

  7. a$$hole said on January 22, 2009

    umount /mnt/test

  8. Nokie said on February 7, 2009

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

  9. bob said on February 9, 2009

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

  10. Lawrence said on April 14, 2009

    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?

  11. michael said on April 19, 2009

    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?

  12. mainmeat said on September 10, 2009

    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

  13. Anonymous said on October 21, 2009

    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

  14. Anonymous said on November 30, 2009

    mount: only root can do that

  15. jackwade said on March 26, 2010

    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.

  16. X81kilo said on June 30, 2010

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

  17. vps-hosting-online said on August 21, 2010

    Not working

  18. Guest said on October 10, 2010

    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.

  19. joe said on November 6, 2010

    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)

  20. Joe said on November 6, 2010

    sorry, meant to say / is start of base system

  21. Hgfd said on June 26, 2011

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

  22. Hgfd said on June 26, 2011

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

  23. Roshan said on July 14, 2011

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

  24. Naveen Nishad said on August 13, 2011

    mkdir -p /mnt/test

  25. Ace said on August 30, 2011

    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?

  26. qmchenry said on August 30, 2011

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

 

RSS feed for comments on this post. TrackBack URL

Leave a comment -