Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does it mean to mount a file system in linux?

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?

like image 527
pizzaEatingGuy Avatar asked Dec 21 '25 21:12

pizzaEatingGuy


1 Answers

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).

like image 135
Sam Varshavchik Avatar answered Dec 24 '25 10:12

Sam Varshavchik



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!