/proc, /usr, /var, /home are called file systems.
What does that mean? i thought there was only one file system (e.g. ext4)..
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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
root file system or something file system simply refers to a directory structure.
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 directories, depending on the nature of the stored information and security requirements.
I believe in your case those directories are called "file systems" because they are are often used as a mount point for individual file systems.
/proc is always a mount point for the
procfs pseudo-file system that presents information about processes and other system information in a hierarchical file-like structure.
There are a few directories which can be considered 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):
To boot a system, enough must be present on the root partition to mount other filesystems. This includes utilities, configuration, boot loader information, and other essential start-up data. /usr, /opt, and /var are designed such that they may be located on other partitions or filesystems.
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:
user@box:~$ mount /dev/sda7 on /home type ext3 (rw,relatime,errors=remount-ro,commit=0) proc on /proc type proc (rw)
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.