I have several closely related questions about what happens when I insert a CD. The files on the CD /media/Ubuntu\ 11.04\ i386/
, but from what I've seen /dev/cdrom
is also involved.
What is the difference between
/dev
,/media
and/mnt
? Following is what I have found from internet but I still have little idea:/dev
— this folder contains device files/media
— this is a mount point for removable devices/mnt
— this is a temporary mount point
What is the purpose of
mount
? In other words, if a device has been represented by the OS as a device file under/dev
, why can it not be accessed via the device file directly without mounting?Is mount only used for storage device, not for non-storage device, such as graphical card, network card, camera, ...?
Where is a device file under
/dev
mounted to, under/media
or under/mnt
? I remember I have seen both, but am curious when to mount to which?I found my CD was automatically mounted to
/media/Ubuntu 11.04 i386
. I guess the device file of the CD is/dev/cdrom
, but I cannot confirm it by looking into/dev/cdrom
and/media/Ubuntu 11.04 i386
:$ ls -l /media/Ubuntu\ 11.04\ i386/ total 3522 -r--r--r-- 1 Tim Tim 143 2011-04-27 13:04 autorun.inf ... $ ls -l /dev/cdrw lrwxrwxrwx 1 root root 3 2011-05-28 15:12 /dev/cdrw -> sr0 $ ls -l /dev/cdrom lrwxrwxrwx 1 root root 3 2011-05-28 15:12 /dev/cdrom -> sr0
How can I find out which device file is for my CD?