These days, CDs and DVDs are not popular. However, you still may need to use CD drive to able to insert a disc and mount it on Linux for your needs.
In this post we will do it step by steps. Here are the our steps:
First, use the blkid command to see what device file your CD-ROM is using.
Usually, this should be /dev/sr0. Don’t forget it may different on your system
You’ll know it’s the right one because it should say ISOxx or something
Next, create a mount point for where you’d like to mount the CD-ROM to.
As a root user
$ mkdir /mnt/cdrom
Now we can use the mount command to map the device file to the directory we’ve just created.
$ 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 by;
$ mount | grep cdrom