version 4, including all changes.
.
Rev |
Author |
# |
Line |
1 |
CraigBox |
1 |
A directory in a FileSystem that doesn't itself have any contents, but is used to [Mount] another FileSystem in its place. |
|
|
2 |
|
|
|
3 |
For example, your root file system __/__ must exist on one 'volume' (partition). If you have /usr on another hard disk, you create an empty directory called /usr on the first hard disk, and you [Mount] the file system on the second disk to that mount point. You can then access the files in the /usr. |
|
|
4 |
|
|
|
5 |
If you're unfamiliar with the standard Linux file layout, see FileSystemHierarchy. |
|
|
6 |
|
|
|
7 |
Mountpoints are generally defined in fstab(5) and handled by mount(8). |
|
|
8 |
|
3 |
ChrisRodliffe |
9 |
Usually, when your system starts up, it will mount all the file systems (partitions) listed in /etc/fstab. |
2 |
ChrisRodliffe |
10 |
|
|
|
11 |
You can mount additional file systems using the mount command from the command line. |
3 |
ChrisRodliffe |
12 |
|
|
|
13 |
Note that if you mount a partition (filesystem) in a non-empty directory, Linux will ignore (but not damage) the files already in that directory; they will reappear if the |
|
|
14 |
partition is unmounted. However this is not usually done, it's normal practice to create an empty directory for the mount point. |
2 |
ChrisRodliffe |
15 |
|
|
|
16 |
!Common Examples |
1 |
CraigBox |
17 |
|
|
|
18 |
; __/cdrom__ and __/floppy__ : Linked to your floppy and CDROM drive (in fstab(5)), and empty until you put a disk in and mount it. |
|
|
19 |
; __/mnt__ : A special case, __/mnt__ is a directory that is defined by the Filesystem Hierarchy Standard as the MountPoint for a temporarily mounted file system. |
2 |
ChrisRodliffe |
20 |
|
3 |
ChrisRodliffe |
21 |
Typically, you may wish to mount a USB flash card or card reader with e.g. |
|
|
22 |
__mount -t vfat /dev/sda1 /mnt__ (where vfat is the file type, /dev/sda1 |
|
|
23 |
is where the USB card reader is plugged in, and /mnt is the mount point). |
|
|
24 |
Cards in some multi-card readers of the type that support SD, XD, MMC, CF etc cards may show up as /dev/sdb1, /dev/sdc1 or /dev/sdd1 instead). |
2 |
ChrisRodliffe |
25 |
|
4 |
ChrisRodliffe |
26 |
Remember to un-mount the card (with e.g. __umount /mnt__ ) before unplugging |
2 |
ChrisRodliffe |
27 |
the USB connection. (Note it's 'umount' not 'unmount'). |
|
|
28 |
|
|
|
29 |
More recent Linux distros will save you the bother by auto-mounting CD's and |
|
|
30 |
USB cards. |
1 |
CraigBox |
31 |
|
|
|
32 |
This system is completely extensible - your filesystem can grow from / as far as it needs to grow. |
|
|
33 |
|
|
|
34 |
Compare DriveLetters (which can't grow past 24 'mount points'). |