Linux Format

Mount Points

-

Drive locations and mount points can be confusing, particular­ly those coming from Windows and expecting something akin to the C:,D:, E: notation. In Linux, everything is available in the root filesystem at /. When a device is mounted, you specify both the device to mount and the place to mount it, called the mount point. The contents of the device are then visible inside that mount point. A mount point is nothing magic, it is simply a directory. The most common example is of using a separate partition for the home directory. In this case, home on the root partition is an empty directory, as you can see if you boot from a live CD and mount the root partition. Once the other partition is mounted at /home, its contents can be seen there, so if the home partition contains directorie­s for alice and bob, these appear at /home/alice and /home/bob.

Permission­s can be a confusing aspect of mount points. The permission­s of the directory used for the mount are irrelevant, it takes on the permission­s and ownership of whatever is mounted under it, so trying to change them on an unused mount point is a fruitless exercise. If you are mounting a filesystem that doesn’t have Linux permission­s, like a FAT formatted USB stick, the mount point is given fake permission­s to enable you to read and write with the device. Mount points give a great deal of flexibilit­y, eg if you have a large drive full of videos, you can mount it at ~/Videos so that the contents still appear in your home directory, despite being on a completely different drive.

 ??  ??

Newspapers in English

Newspapers from Australia