Linux Find Out Name Of DVD / CD-ROM / Blu-ray Writer Device

last updated in Categories , ,

How do I find out what the name of my CD-ROM or DVD device or Blu-ray device is under Linux operating system without using GUI options?

You can type the following command to see current information about installed and detected CDROM or DVD-writers under Linux operating systems:

[a] The dmesg command can be used to check if given hardware or device was identified correctly by the Linux kernel.[donotprint][/donotprint]

[b] /proc/sys/dev/cdrom/info file name.

[c] lsblk command.

dmesg Command

dmesg command is used to examine the Linux kernel ring buffer i.e. display bootup messages on screen. To find out if cdrom was detected or not, run:
$ dmesg | egrep -i --color 'cdrom|dvd|cd/rw|writer'
Sample outputs:

[    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

In this output sr0 is my cdrom / dvd reader and writer. You can see more detailed information by typing the following command
$ less /proc/sys/dev/cdrom/info
OR
$ more /proc/sys/dev/cdrom/info
Sample outputs:

CD-ROM information, Id: cdrom.c 3.20 2003/12/17
 
drive name:		sr0
drive speed:		24
drive # of slots:	1
Can close tray:		1
Can open tray:		1
Can lock tray:		1
Can change speed:	1
Can select disk:	0
Can read multisession:	1
Can read MCN:		1
Reports media changed:	1
Can play audio:		1
Can write CD-R:		1
Can write CD-RW:	1
Can read DVD:		1
Can write DVD-R:	1
Can write DVD-RAM:	1
Can read MRW:		1
Can write MRW:		1
Can write RAM:		1

To see CD-ROM drive characteristics information, enter:
$ cd-drive
Sample outputs:

cd-drive version 0.81 x86_64-pc-linux-gnu
Copyright (c) 2003, 2004, 2005, 2007, 2008 R. Bernstein
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
The driver selected is GNU/Linux
The default device for this driver is /dev/cdrom

Drivers available...
  GNU/Linux ioctl and MMC driver     
  cdrdao (TOC) disk image driver     
  bin/cuesheet disk image driver     
  Nero NRG disk image driver         

CD-ROM drive supports some nonstandard or degenerate set of MMC

                       Drive: /dev/cdrom
Vendor                      : MATSHITA
Model                       : BD-RE UJ232A    
Revision                    : 1.10
Profile List Feature
	Unknown Profile 41
	Unknown Profile 42
	Unknown Profile 43
	Unknown Profile 40
	Re-writable DVD
	DVD+R - DVD Recordable
	DVD+RW - DVD ReWritable
	Re-recordable DVD using Restricted Overwrite
	Re-recordable DVD using Sequential recording
	Re-recordable DVD using Sequential recording
	Read only DVD
	CD-RW Re-writable Compact Disc capable
	Write once Compact Disc capable
	Read only Compact Disc capable

Core Feature

Morphing Feature
	Operational Change Request/Notification supported
	Synchronous GET EVENT/STATUS NOTIFICATION supported

Removable Medium Feature
	Tray type loading mechanism
	can eject the medium or magazine via the normal START/STOP command
	can be locked into the Logical Unit

Write Protect Feature

Random Readable Feature

Multi-Read Feature

CD Read Feature
	C2 Error pointers are supported
	CD-Text is supported

DVD Read Feature

Random Writable Feature

Incremental Streaming Writable Feature

Formattable Feature

Management Ability of the Logical Unit/media system to provide an apparently defect-free space. Feature

Restricted Overwrite Feature

DVD+RW Feature

DVD+R Feature

Rigid Restricted Overwrite Feature

CD Track at Once Feature

CD Mastering (Session at Once) Feature

DVD-R/RW Write Feature

Unknown code 34 Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Profile List Feature

Hardware                                  : CD-ROM or DVD
Can eject                                 : Yes
Can close tray                            : Yes
Can disable manual eject                  : Yes
Can select juke-box disc                  : No

Can set drive speed                       : No
Can read multiple sessions (e.g. PhotoCD) : Yes
Can hard reset device                     : Yes

Reading....
  Can read Mode 2 Form 1                  : Yes
  Can read Mode 2 Form 2                  : Yes
  Can read (S)VCD (i.e. Mode 2 Form 1/2)  : Yes
  Can read C2 Errors                      : Yes
  Can read IRSC                           : Yes
  Can read Media Channel Number (or UPC)  : Yes
  Can play audio                          : Yes
  Can read CD-DA                          : Yes
  Can read CD-R                           : Yes
  Can read CD-RW                          : Yes
  Can read DVD-ROM                        : Yes

Writing....
  Can write CD-RW                         : Yes
  Can write DVD-R                         : Yes
  Can write DVD-RAM                       : Yes
  Can write DVD-RW                        : No
  Can write DVD+RW                        : No

CD-ROM drive supports some nonstandard or degenerate set of MMC

                       Drive: /dev/sr0
Vendor                      : MATSHITA
Model                       : BD-RE UJ232A    
Revision                    : 1.10
Profile List Feature
	Unknown Profile 41
	Unknown Profile 42
	Unknown Profile 43
	Unknown Profile 40
	Re-writable DVD
	DVD+R - DVD Recordable
	DVD+RW - DVD ReWritable
	Re-recordable DVD using Restricted Overwrite
	Re-recordable DVD using Sequential recording
	Re-recordable DVD using Sequential recording
	Read only DVD
	CD-RW Re-writable Compact Disc capable
	Write once Compact Disc capable
	Read only Compact Disc capable

Core Feature

Morphing Feature
	Operational Change Request/Notification supported
	Synchronous GET EVENT/STATUS NOTIFICATION supported

Removable Medium Feature
	Tray type loading mechanism
	can eject the medium or magazine via the normal START/STOP command
	can be locked into the Logical Unit

Write Protect Feature

Random Readable Feature

Multi-Read Feature

CD Read Feature
	C2 Error pointers are supported
	CD-Text is supported

DVD Read Feature

Random Writable Feature

Incremental Streaming Writable Feature

Formattable Feature

Management Ability of the Logical Unit/media system to provide an apparently defect-free space. Feature

Restricted Overwrite Feature

DVD+RW Feature

DVD+R Feature

Rigid Restricted Overwrite Feature

CD Track at Once Feature

CD Mastering (Session at Once) Feature

DVD-R/RW Write Feature

Unknown code 34 Feature

Vendor-specific code f048 Feature

Vendor-specific code 473e Feature

Vendor-specific code eaff Feature

Vendor-specific code a4ab Feature

Vendor-specific code eaff Feature

Hardware                                  : CD-ROM or DVD
Can eject                                 : Yes
Can close tray                            : Yes
Can disable manual eject                  : Yes
Can select juke-box disc                  : No

Can set drive speed                       : No
Can read multiple sessions (e.g. PhotoCD) : Yes
Can hard reset device                     : Yes

Reading....
  Can read Mode 2 Form 1                  : Yes
  Can read Mode 2 Form 2                  : Yes
  Can read (S)VCD (i.e. Mode 2 Form 1/2)  : Yes
  Can read C2 Errors                      : Yes
  Can read IRSC                           : Yes
  Can read Media Channel Number (or UPC)  : Yes
  Can play audio                          : Yes
  Can read CD-DA                          : Yes
  Can read CD-R                           : Yes
  Can read CD-RW                          : Yes
  Can read DVD-ROM                        : Yes

Writing....
  Can write CD-RW                         : Yes
  Can write DVD-R                         : Yes
  Can write DVD-RAM                       : Yes
  Can write DVD-RW                        : No
  Can write DVD+RW                        : No

lsblk command

To list all block devices, enter:
# lsblk
Sample outputs:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    1   558G  0 disk 
├─sda1   8:1    1   307M  0 part /boot
├─sda2   8:2    1   250G  0 part /datasql
├─sda3   8:3    1     6G  0 part [SWAP]
├─sda4   8:4    1     1K  0 part 
└─sda5   8:5    1 301.7G  0 part /
sr0     11:0    1  1024M  0 rom  

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Start the discussion at www.nixcraft.com

Historical Comment Archive

5 comment

  1. lsscsi – the best tool for drives info etc.
    also lsusb for usb devices

    apt-get install lsscsi lsusb

  2. grep should not be case sensitive. I have my cdrom drive in CAPS

    # dmesg |egrep -i ‘cdrom|dvd|cd/rw|writer’
    hdc: VMware Virtual IDE CDROM Drive, ATAPI CD/DVD-ROM drive

  3. Hi,
    How can we remove many “Profile List Feature” without any other external command ?

    thanks a lot

  4. If the /proc/sys/dev/cdrom/info output shows:
    Can close tray: 1

    What command will close the tray and do any specific packages need to be installed to do so?

    Still, have a question? Get help on our forum!