How to mount cdrom in Linux
15 October 2021 by Luke Reynolds
These days, CDs and DVDs are becoming less popular, in favor of flash drives and other convenient, portable media. However, you still may come across them every once in a while, and if your computer has a CD drive, you should be able to insert a disc and mount it on Linux.
In this tutorial, you’ll see the Linux commands necessary to mount a CDROM.
In this tutorial you will learn:
- How to mount cdrom in Linux
|Requirements, Conventions or Software Version Used
|Any Linux distro
|Privileged access to your Linux system as root or via the
|# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
Follow along with the steps below to mount a CD or DVD in Linux. Start off by inserting the disc into your computer, then run through these steps:
- First, try using the
blkidcommand to see what device file your CD is using. Usually, this is going to be
/dev/sr0, but it’s possible that yours is something different. You’ll know it’s the right one because it should say
ISO9660Viewing device file path of cdrom in Linux
- Next, create a mount point for where you’d like to mount the CD to. Or, just pick an empty directory somewhere on your computer, if you already have a place in mind.$ sudo mkdir /mnt/cdrom
- Now we can use the mount command to map the device file to the directory we’ve just created.$ sudo mount /dev/sr0 /mnt/cdrom mount: /mnt/cdrom: WARNING: device write-protected, mounted read-only.
- Your CD or DVD should now be accessible in the directory which it was mounted to.$ cd /mnt/cdrom You can also verify that the mount was successful by using the
mountcommand without further options.$ mount | grep cdrom Accessing a mounted cdrom in Linux
- When you are done, just unmount the CD and eject it from the disc tray.
$ sudo umount /mnt/cdrom
In this tutorial, we saw how to mount a CD or DVD rom on Linux systems. As you can see, the process is quite simple, and you will probably be able to do it in the future without a problem, now that you have done it once. Mounting and accessing a CDROM is pretty similar to mounting any other type of media.