I was reading somewhere that File systems are ‘mounted’ over a particular directory
Then there was an example of a user space file system saying that to mount you have to type
./program.py ~/somedir
Can someone please explain the idea of mounting a filesystem in linux?
A better way to describe "mount" is "attach".
The filesystem being mounted is attached to an empty directory of the existing filesystem. That is, the top level directory of the mounted filesystem becomes the directory on the existing filesystem.
Subdirectories of the mounted filesystem become the subdirectories of the former directory on the existing filesystem, and so on.
(The directory that was mounted on doesn't really have to be empty, but after mounting any contents it had are inaccessible, until the filesystem is unmounted).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With