How do I find out what the name of my CD-ROM or DVD 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. The dmesg command can be used to check if given hardware or device was identified correctly by the Linux kernel.
| Tutorial details | |
|---|---|
| Difficulty | Easy |
| Root privileges | No |
| Requirements | None |
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
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 4 comments… read them below or add one }
lsscsi – the best tool for drives info etc.
also lsusb for usb devices
apt-get install lsscsi lsusb
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
Hi,
How can we remove many “Profile List Feature” without any other external command ?
thanks a lot
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?