/proc, /usr, /var, /home are called file systems.
What does that mean? i thought there was only one file system (e.g. ext4)..
|show 1 more comment|
The term "file system" has several meanings. When people talk about the file system names like ext4, UFS, NTFS etc. they have in mind the organization of data storage at low level (in terms of blocks on media). Such "file systems" usually requires driver to access data stored on media formatted with that file system. In the case of
Technically in Linux any directory can be a mount point for file system. This allows you to select the best type of file system (ext4, ufs, xfs etc.) for individual directory, depending on the nature of the stored information and security requirements.
I believe in your case those directories called "file systems" because they are are often used as a mount point for individual file systems.
There are a few directories wich can be named file systems:
/proc is a very special folder, and it is not stored on disk, but in memory and is used to give info about system (CPU, RAM, devices..). So it use a special File System (not ext4) that is called procfs. You can read more on Wikipedia: procfs
Instead, /usr, /var and /home are generally (at least on a desktop computer) stored on the same file system (e.g. ext4), and often on the same disk: they are regular folders, with specific meanings. Always on Wikipedia you can find detailed info on Filesystem Hierarchy Standard.
They are not really "file systems", but this paragraph help explaning this naming usage (from FHS 2.3 reference):
You can think of a file system as a structure that allows files to be created in a data storage device. The device is something like a hard disk partition, RAM or a USB stick, for example. The file system type is the format used to store data in the file system, for example ext4, vfat or lots of others. File systems (devices) can be mounted as directories (folders), also called mount points.
To run an OS, you must have a root file system, where the OS is installed. This is mounted as / (root) during boot, and all other file systems are mounted under it. From the examples you give, /usr and /var can be either part of the root file system, or separate file systems (a different partition in same or different drive as /). If separate file systems, they can even be a different file system type than / (I think!). On the other hand, /proc is a file system in RAM (also known as a RAM disk) with its own type with the same name, proc.
The mount command on a terminal gives you this information about all mounted file systems: device, mount point, type. For instance:
This means I have partition sda7 mounted as /home (with all my precious data!), and it is formatted with type ext3; device proc is mounted on /proc with type proc. The permissions for each file system are also given (rw, etc).
One last point: file systems are often referred to by their mount points. That is, in the example above I could say that device sda7 is my /home file system. This is not strictly correct, although clear to most people: it means the file system is intended to be mounted with mount point /home. But there's nothing stopping me from mounting the file system in sda7 under mount points /work, /hotel or /sunny_beach. Indeed, the raw data can also be accessed directly under /dev/sda7 (mounted or unmounted) without knowledge of the underlying file system. This can useful for data recovery in cases of file system corruption, when the file system can no longer be mounted but the device is still readable. Such direct access is however potentially disastrous and should be used only in exceptional circumstances.