Windows supports drive mountpoints too (Microsoft calls them "reparse points", but the concept is the same). Since you are more familiar with Windows than with *NIX operating systems, here's a little experiment you can perform in Windows to help you understand the concept:
- Insert a USB flash drive into your computer.
- Create a new, empty folder on your desktop.
- Open up the Disk Management console, right-click your flash drive, and select
Change Drive Letters and Paths...
- In the dialog that comes up, hit the
Add...
button.
- Make sure the
Mount in the following empty NTFS folder:
button is selected, and browse to the path of that folder you created on your desktop (e.g. C:\Users\<your profile>\Desktop\New Folder
)
- Hit OK and OK. Now check out your desktop. You will see that the folder you created has a drive shortcut icon:
If you look at it from a command prompt window, you will see it as a <JUNCTION>
object type:
Note that your flash drive now has two mount points; E:
(or whatever) and that folder you created in step 2. You can remove the drive letter if you want, and you will still be able to copy files to/from it through the folder on your desktop. You can even add multiple drive letters for it if you want. This is what a mount point is: It's simply a path for you to access your drives/partitions.
Unlike Linux, Windows is representing this folder to you as some kind of oddball shortcut. Windows does this because mountpoints are a bit of a strange concept in Microsoft's world (hence your confusion). They don't even work properly in a lot of cases. But in *NIX operating systems, this is just the way things are done. A directory can be either a folder or a mountpoint in Linux, and most of the time the distinction between the two doesn't matter.
*NIX operating systems do not have a concept of drive letters. Your "root" filesystem (/
) is always at the top of the tree, and is (usually but not always) mounted as your system's boot drive. This is what C:\
is to Windows. There can only ever be one root (just like there can only be one C:
drive). Every other drive or partition on your system must be mounted to a path (directory) under this root. So, what would be D:
or E:
in Windows would be /mnt/D_Drive
, /media/cdrom
, or even /var
, /home
, or whatever in Linux.
Now this is an important thing, and is a big source of your confusion:
A device node is not the same thing as a mountpoint. Both Windows and Linux have device nodes. The difference is that Windows never shows them to you, and they do not exist as files on your hard drive the way they do in Linux.
In the command prompt screenshot above, you'll notice that the folder you created is listed as \??\Volume{GUID}\
. In both Linux and Windows the raw device itself has a device node (e.g. /dev/sda1
in Linux or \??\Volume{GUID}
in Windows). The mountpoint is the filesystem on that device. In Windows, you can think of drive letters (E:\
for example) as mountpoints for your drives/partitions. The only difference is that Windows never shows you the \??\Volume{GUID}
device node. It only shows you mountpoints, and those mountpoints are almost always drive letters (but, as we see from the experiment above, don't have to be).
I hope this clears things up for you.
Now, go back into Disk Management and delete that mountpoint before you accidentally do something stupid, like trying to copy/move it somewhere! :-)
Best Answer
Well, up until a few years ago every distro did it their own way. Now there is a standard for directory layout (the Filesystem Hierarchy Standard, FHS) which most distros follow.
According to FHS, Media goes under /media. So yes, if your distro complies with FHS (most do), then mounted media will go under /media.
One catch: The FHS does not exhaustively describe how the entry under /media will be named. The names
floppy, cdrom, cdrecorder, zip
must be used, but there's no standard (yet) for USB drives. Also, there may be multiple drives, in which case numbers will be appended.