Mounting a CD from the Linux command line

This is more for my own records than anything else – this is how you mount a CD (or .iso image) from the command line:


mount -t iso9660 /dev/sr0 /mnt #mount a CD/DVD from optical drive
mount -t iso9660 /path/to/file.iso /mnt #mount an .iso file

that is all! Depending on your system, you’ll likely need to use sudo/be root.

Edit: On some distributions (Ubuntu 12.04 server for example), the cdrom device is known as /dev/cdrom instead of /dev/sr0