[Ilugc] commands

  • From: lug@xxxxxxxxxxxxxxxxxx (Chandrashekar Babu)
  • Date: Sun Aug 28 02:27:56 2005

On Sat, 27 Aug 2005 22:55:14 +0530, mayoor bhandari  
<mayoorbhandari@xxxxxxxxx> wrote:

i jus wanted to know "what does mounting ofCD means".actually i have  
done it using themount command in DEBIAN,but couldnt understandwhy it is  
needed?

Linux is a UNIX-like OS, thus it follows semantics
and conventions that exist on the UNIX platform.

On all UNIX platforms (Linux included), secondary
storage devices should ideally be mounted in order
to access the filesystem within them. Most CDROM
hold a filesystem too, just like the hard disk
or floppy disk.

On UNIX, all devices are generally accessible as
files which you can open, read, write just like
any other files - CDROM device is no exception
(unlike in Windows platform where you access
secondary storage devices by mostly hard-coded
drive letters). If you try reading the device
file used to represent CDROM device on UNIX,
you'll end up accessing the entire CDROM
as a single file (like an ISO image file).

But,if you want to access the filesystem within
the CDROM, then you'll need some mechanism, by
which the filesystem could be "attached" to a
directory which is known as the "mount point".
This is what the mount command does. Thus, by
mounting a CDROM to a mount point, you can access
its contents by navigating the mount point itself.

In case you wish to remove the CDROM, you'll need
to "detach" CDROM's filesystem from its "mount
point". Thats what the umount command does.

However, most Linux distributions these days
with KDE or GNOME automatically mount the CDROM
when you double-click on the CDROM icon, and open
the mount point folder for you, creating seemless
interface/abstraction to access your CDROM, much
like in the MS Windows platform. This is usually
done by helper programs/daemons called autofs or
supermount.

I hope this clears your doubt. Any good introductory
book on UNIX/Linux should explain this concept in a
better way :-)

--
Chandrashekar Babu.
http://www.chandrashekar.info/

Other related posts: