Mounting ISO Files Without Burning CDs

April 22nd, 2009 by Shawn Powers in

Your rating: None Average: 3.7 (9 votes)

How to mount an ISO image from the command line.

Download in .ogv format
__________________________
Shawn Powers is an Associate Editor for Linux Journal. You might find him chatting on the IRC channel, or Twitter


Special Magazine Offer -- Free Gift with Subscription
Receive a free digital copy of Linux Journal's System Administration Special Edition as well as instant online access to current and past issues. CLICK HERE for offer

Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anonymous's picture

create iso image on mac

On June 15th, 2009 Anonymous (not verified) says:

If you want burn dvd to iso image file or create an iso image from dvd on mac,I share you below website:
http://www.xihalife.com/blogs/entries/17715.htm

Anonymous's picture

Same or different for DVD?

On May 5th, 2009 Anonymous (not verified) says:

What would the command line be for mounting a DVD? The last time I tried mounting a few DVD/iso images already ripped to my hard disk, each command I found by googling failed (can't remember them any more).

Anonymous's picture

Following the KISS principles...

On May 1st, 2009 Anonymous (not verified) says:

If you would rather not wait for the video (or if you would rather have something to copy and paste into your own local file), here is my summary of this video.

You need a place to mount the iso9660 file into. Or 'onto', if that is your view of mounting.

Open a terminal application, type these commands:
user@host:~$ mkdir foobu
That might not be necessary if you know of a different empty mount point.

Now, to actually mount the iso file:
user@host:~$ sudo mount -o loop -t /absolutepath/to/iso9660 foo.iso ./foobu
Password:

(or: user@host:~$ sudo mount -o loop -t ./relativepath/to/iso9660 foo.iso ./foobu). At the Password: prompt, you must enter the correct sudo password so the mount command can execute.

If you want to use the iso9660 at the commandline, type the following:
user@host:~$ cd ./foobu

There you are, in the root directory inside the iso9660 file.
Have at it!

When you have finished using the iso9660 file, again, open a terminal (or re-use the existing terminal) and type:
user@host:~$ cd ~
user@host:~$ sudo -umount ./foobu

For my distro, you must also enter the correct sudo password so that this second sudo command will execute.
I added the cd ~ part mostly for those situations where you were inside the iso9660 directory and tried to umount the iso9660... umount could fail because you, the user, might still have been inside the iso9660 directory. Similar failures of umount could occur if you were still using ANY program to access the iso9660, so be certain you close all application which were ever using files in that iso9660.

End.

Anonymous's picture

iso9660 foo.iso should

On May 1st, 2009 Anonymous (not verified) says:

iso9660 foo.iso

should read

iso9660foo.iso

spurious extra space in the iso string.

Anonymous's picture

Corrections to my comment....

On July 23rd, 2009 Anonymous (not verified) says:

If you would rather not wait for the video (or if you would rather have something to copy and paste into your own local file), here is my summary of this video.

You need a place to mount the iso9660 file into. Or 'onto', if that is your view of mounting.

Open a terminal application, type these commands:
user@host:~$ mkdir foobu
That might not be necessary if you know of a different empty mount point.

Now, to actually mount the iso file:
user@host:~$ sudo mount -o loop -t /absolutepath/to/iso9660foo.iso ./foobu
Password:
(or: user@host:~$ sudo mount -o loop -t ./relativepath/to/iso9660foo.iso ./foobu). At the Password: prompt, you must enter the correct sudo password so the mount command can execute.

If you want to use the iso9660 at the commandline, type the following:
user@host:~$ cd ./foobu

There you are, in the root directory inside the iso9660 file.
Have at it!

When you have finished using the iso9660 file, again, open a terminal (or re-use the existing terminal) and type:
user@host:~$ cd ~
user@host:~$ sudo umount ./foobu

For my distro, you must also enter the correct sudo password so that this second sudo command will execute.

I added the cd ~ part mostly for those situations where you were inside the iso9660 directory and tried to umount the iso9660... umount could fail because you, the user, might still have been inside the iso9660 directory. Similar failures of umount could occur if you were still using ANY program to access the iso9660, so be certain you close all application which were ever using files in that iso9660.

End.

EDITS: July 23 2009: removed the space from within the file name (Linux has a hard time with Microsoftian philosophy) and after repeating the commands, I discovered the dash before the umount command was unacceptable).

Anonymous's picture

True that. Sigh. I checked

On July 23rd, 2009 Anonymous (not verified) says:

True that. Sigh.

I checked formatting, I checked html tags and then I checked again for idea sequence, and thought I had it all.

-space- tripped me up. Microsoft has trained me badly.

Faresko's picture

Thanks .. also if you don't

On April 23rd, 2009 Faresko (not verified) says:

Thanks ..

also if you don't like command line or anyone ...

you can use Gmountiso it's easy

Michael Eager's picture

Mount an ISO image

On April 22nd, 2009 Michael Eager (not verified) says:

Hi --

I always have trouble remembering the options for mount. So I use a loopback device:

$ sudo mkdir /mnt/CD
$ sudo losetup /dev/loop0 ubuntu.iso
$ sudo mount /dev/loop0 /mnt/CD

< access /mnt/CD as desired >

$ sudo umount /mnt/CD
$ sudo losetup -d /dev/loop0

Post new comment

Please note that comments may not appear immediately, so there is no need to repost your comment.
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <pre> <ul> <ol> <li> <dl> <dt> <dd> <i> <b>
  • Lines and paragraphs break automatically.

More information about formatting options

Newsletter

Each week Linux Journal editors will tell you what's hot in the world of Linux. You will receive late breaking news, technical tips and tricks, and links to in-depth stories featured on www.linuxjournal.com.
Sign up for our Email Newsletter

Tech Tip Videos

From the Magazine

January 2010, #189

You say potato, I say potahto, you say ham, I say amateur... you see where I'm going with this? Ok, maybe not, Amateur Radio, that's where and that's what this month's issue focus is. What you might ask is the connection between Amateur Radio and Linux? Well Linux may be the only O/S out there with an AX.25 packet radio protocol driver, and it's had it since forever. So blow the dust off your license and start reading.


If Ham's not your favorite food, don't despair there are plenty of other articles in this month's issue including, but not limited to, Firewall Builder, Cucumber, Vimperator, port knocking with knockd, building appliances with Linux and Xen, and using Twitter from the command line.

Read this issue