On Wed, 05 Jan 2005 04:00:39 +0000, Al. C wrote:
> I've read a ton on Linux books this past year. But two things that are never
> explained well are:
>
> What is a device? By that I mean what are the entries in /dev (like /dev/cdrom
> or /dev/fd0 etc.) I don't mean what they stand for, but WHAT are they?
>
> Then, what is a mountpoint? What is /mnt/cdrom mean?
>
> I know what a file is. It holds data... text, binary, etc. And I know that
> filenames and directory names are entries in an inode table.
>
> I don't understand what a device is, what a mountpoint is and what the
> relationship between them is.
>
> The books all say "In Linux everything is a file" and then they go off into
> gibberish-land... I often think the AUTHORS don't know the answer!
>
> I ask here because Slackers really KNOW some %^&* and I won't get
> misinformation like I would in comp.os.linux.xxxx.
>
> So if some kind soul has a few minutes to either give a short explanation...
> or point me to an article that explains this for idiots I'd be appreciative.
> And I'm sure I'm not the ONLY person confused on /dev and /mnt.
>
> Al C.
In Linux, everything is a file - that's what makes things so easy to
handle. Something like /dev/hda1 is a 'block special' file as opposed to a
'character' file (like a text file). /dev/cdrom is a special file for
handling the cdrom drive. A mountpoint, like /mnt/cdrom is also a file -
a directory - if it didn't already exist, you would do 'mkdir /mnt/cdrom'
to make it - it is simply a place to mount the contents of the cdrom. /dev
and /mnt are both directories - the entries in /dev are special files for
handling devices - the entries in /mnt are files, too - they are empty
(usually, but not necessarily) which are places to 'mount' or access the
contents of file structured devices.
Hope that helps a little - I don't know of a good discussion, you might
try looking in
www.tldp.org or
www.yolinux.com.