≡ Menu

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

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.

[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
 

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  
Share this tutorial on:
{ 5 comments… add one }
  • Steve August 6, 2012, 8:36 pm

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

    apt-get install lsscsi lsusb

  • depak August 7, 2012, 10:40 am

    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

  • Jalal Hajigholamali August 10, 2012, 2:12 am

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

    thanks a lot

  • cameron February 4, 2013, 11:52 pm

    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?

    • GG October 18, 2013, 7:12 pm

      try eject -t

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">


   Tagged with: , , , , , , , , , , , , ,