mercredi 14 janvier 2015

Why do we need to mount on Linux?


I understand what mounting is in Linux, and I understand device files. However I do not understand WHY we need to mount.


For example, as explained in the accepted answer of this question, using this command:



mount /dev/cdrom /media/cdrom


we are mounting the CDROM device to /media/cdrom and eventually are able to access the files of CDROM with the following command



ls /media/cdrom


which will list the content of the CDROM.


Why not skip mounting altogether, and do the following?



ls /dev/cdrom


And have the content of the CDROM Listed. I expect one of the answers to be: "This is how Linux is designed". But if so, then why was it designed that way? Why not access the /dev/cdrom directory directly? What's the real purpose of mounting?



Aucun commentaire:

Enregistrer un commentaire