Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Normally when you do a mount, it's "mount (options) device directory". Options begin with a hyphen ("-"). Device is usually something like "/dev/sda". And the directory is just a directory such as /movies that you've created with a mkdir command, such as "mkdir /movies".
Let's take the case of where the .iso file is on your desktop. In your case, "Mike" I believe, it would probably be "/home/Mike/somename.iso". Let's assume that it's a movie that you want to play, and create a directory to play all movies. I'm kinda sloppy about this by not subdirring out of "/mnt". So, I just made a movies directory by "mkdir /movies".
So, where does that put us? Let's say that you ripped "Prisoner Of Azkaban".iso to your desktop. The embedded spaces are a nuisance, of course, but the mount command could be: "mount -o loop /home/Mike/"Prisoner Of Azkaban".iso /movies". You could also add the ",ro" (read only) as mentioned above. You could also add the "-t iso9660", as well. My system doesn't require either of those, so I don't usually bother. If you can see the file when you do a "ls"; i.e. if you're in the same directory as the file, you could shorten the command to:
mount -o loop "Prisoner Of Azkaban".iso /movies
Of course, "/movies" could be any directory on your system. Just be sure to understand that if you use a directory that has other files or directories under it, those will be unreachable until you unmount your iso file.
First you need some place to mount the iso file. If doesn't matter what you call this directory. Let's say it's called /mnt/iso. Then as root, "mkdir /mnt/iso" will create the directory.
Since the iso file is in /home/mike/desktop, cd there first to make the mount command shorter.
"cd /home/mike/Desktop/". You haven't said what the name if the iso file is, so for the sake of example, let's suppose that it is example.iso.
The type of filesystem that a CDROM uses is called "iso9660".
Look in the "man mount" manpages for options and filesystems I haven't mentioned. You probably want to su to root before mounting the image unless you have sudo setup.
# sudo mount -t iso9660 example.iso /mnt/iso/ -o ro,defaults,unhide,loop
The filesystem type is given after the "-t". The image is given before the mount location. The options are given after the "-o". The magic is due to the loop option, which allows you to mount an image of a filesystem as if it were the filesystem itself. Because the iso9660 filesystem is readonly, you can only read from it. You can not access the iso contents in the /mnt/iso directory.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.