When I first started using Ubuntu, I think my CD drives were mapped through /dev/cdrom0
and /dev/cdrom1
, etc. but looking at things today, you can see they now come through on a sr
prefix:
$ ll /dev/{cdrom,sr*}
lrwxrwxrwx 1 root root 3 Feb 10 09:15 /dev/cdrom -> sr0
brw-rw----+ 1 root cdrom 11, 0 Feb 10 09:15 /dev/sr0
brw-rw----+ 1 root cdrom 11, 1 Mar 27 10:30 /dev/sr1
I'm just curious what this stands for. TLDP isn't being very helpful here; and it still lists sd
as "SCSI drive", and I think it more commonly means "serial drive" these days.
What does "sr" stand for? Why does /dev/cdrom
still exist?
So, most likely, that stands for SCSI CDrom
Source
I've noticed that this doesn't fully address the question.
As you can see,
/dev/cdrom
is just a symbolic link to/dev/sr0
, which is the actual device.The naming of a character device is dependant on the module which initializes it:
SCSI
CD-ROMS are handled by thesr_mod
module, and they're named after the module itself (srX
).If your CD-ROM drive happened to be an
IDE
drive, the actual device's name would have been/dev/hdX
.So since there are multiple interfaces through which a CD-ROM drive could be attached to the system,
/dev/cdrom
is used to always point to the first CD-ROM device (SCSI
,IDE
or whatever), most likely to give the drive an unique common interface for whatever needs to use it in the system.Source
Reading this, the letter
r
appears to derive from ROM. No further source is given however.