Mount CD-ROM in Linux

How do I mount a CD-ROM or DVD drive on a Linux operating system using command line bash shell based options?

You need to use the mount command to mount a CD-ROM or DVD disk under a Linux operating systems. First, you need to insert the CD or DVD in the server / laptop or desktop drive. Next, type the following mount command as the root use to mount discs. [donotprint]
Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements None
Est. reading time 2m
[/donotprint]

Finding out your CD/DVD names in Linux

Use the following command to find out the name Of DVD / CD-ROM / Writer / Blu-ray device on a Linux based system:
# lsblk

OR

# dmesg | egrep -i --color 'cdrom|dvd|cd/rw|writer'
Sample outputs (/dev/sr0):

[    5.437164] sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[    5.437307] cdrom: Uniform CD-ROM driver Revision: 3.20

Syntax to mount DVD / CDROM in Linux

The syntax is:
# mount -t iso9660 -o ro /dev/deviceName /path/to/mount/point
Create a mount point, type mkdir command as follows:
# mkdir -p /mnt/cdrom
Mount /dev/cdrom or /dev/sr0 as follows:
# mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom
OR
# mount -t iso9660 -o ro /dev/sr0 /mnt/cdrom
Verify that CD/DVD mounted at the /cdrom or /mnt/cdrom, enter:

mount 
df

/cdrom or /mnt/cdrom represents the mount point of the CD or DVD. To view or browse CD or DVD, enter:

ls -l /cdrom
cd /cdrom
ls

To copy a file called foo.txt to the /tmp, enter:

cd /cdrom
cp -v foo.txt /tmp

OR

cp -v /cdrom/foo.txt /tmp

How do I unmount CD-ROM or DVD on Linux?

Type the following command as the root user:
# umount /cdrom
OR
# umount /dev/cdrom
OR
# umount /mnt/cdrom


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 8 comments so far... add one


CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
8 comments… add one
  • Joe Corneli Aug 27, 2013 @ 14:40

    Sometimes the relevant device is

    cdrw

    , not cdrom.

    • sarav May 19, 2014 @ 7:19

      sometimes it is even /dev/sr0
      It all depends on your linux flavour

  • chusoe Feb 25, 2015 @ 2:36

    WOW
    So after lsblk how do you know the cdrom’s name?

    Can you be clear please?

    How do you then mount it?

  • chusoe Feb 25, 2015 @ 5:11

    Finally got it after 3 hours.
    I’m a windows guy.

    Yours is the best i’ve seen, requires some effort but still the best.

  • PrabhuK Nov 11, 2015 @ 5:34

    Thank you for guidance

  • DanielM Jan 20, 2016 @ 1:07

    If you are mounting a cdrw instead of a cdrom, you probably also want to change the -o ro option to -o rw. That way you’ll be able to write to it as well as read from it.

  • T-Cane Feb 23, 2016 @ 4:26

    Newbie needs help!

    Hello, installed Ubuntu with USB, now trying to remove and install Lubuntu with LiveCD. What am I doing wrong? Thank you!

    lsblk response:
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    sda 8:0 0 37.3G 0 disk
    ├─sda1 8:1 0 36.8G 0 part /
    ├─sda2 8:2 0 1K 0 part
    └─sda5 8:5 0 502M 0 part [SWAP]

    dmesg | egrep -i –color ‘cdrom|dvd|cd/rw|writer’ response:
    [ 1.430327] sr0: scsi3-mmc drive: 48x/48x cd/rw xa/form2 cdda tray
    [ 1.430335] cdrom: Uniform CD-ROM driver Revision: 3.20
    sr0 11:0 1 1024M 0 rom

    sudo mount -t iso9660 -o ro /dev/sr0 /mnt/cdrom response with cd installed in drive:
    mount: no medium found on /dev/sr0

  • Murali Sep 5, 2017 @ 7:04

    Very helpful in hosing a RHEL6 on a VM.
    Thank you so much

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum