We sometimes refer to those as filesystems
, because sometimes those directories are mount points. So much for the only question you asked ...
filesystem
can refer to two different things ... or actually two very different aspects of the same thing:
- The logical structure used to organise data on a storage medium.
- The methodology used by the OS to offer processes unified access to data.
The concept of files and directories is a metaphor. To a computer there is only data and all media is nothing but devices that can hold data. Some devices allow reading and writing data (e.g. HDD), other devices only allow reading data (e.g. CD-ROM) and there are even devices that allow only writing data (e.g. printer). We use the file and directory metaphor to structure data, so that we can access small chunks of data, rather than everything at the same time.
The filesystems we put on storage media, e.g. ext4, xfs, fat do the structuring part. We use them to put labels on chunks of data (files) and to have a consistent structured list of all the labels (directories). The structured list is actually a tree. The most important aspect is that a tree has exactly one beginning, its root. Maintaining this structure and ensuring the data is and remains accessible is quite the task, which is why there is not just one flavour of filesystem.
The other aspect of filesystems is, that it is the job of the OS to make the data stored on storage devices accessible to all the programs. This is accomplished by two things:
The OS offers precisely one (programming) interface for accessing and interacting with files and directories. For programs/processes it does not matter whether the filesystem on the storage device is ext2, xfs, fat, or whatever. Progams/processes access files and directories in a uniform way.
The OS organises all the storage media, i.e. their filesystems, in one superordinate structure. Programs access files and directories through this superordinate structure and need not interact with the storage devices directly. That way the programs need not care about on which device the data actually resides. This superordinate structure is often refered to as the kernel's "virtual filesystem".
Adding the filesystem of a storage device to the virtual filesystem is called
"mounting" a filesystem. When your Linux is starting up the kernel creates the virtual filesystem (VFS). Right after creation it is empty and consists only of its entry point, a.k.a. its root, transcribed /
. Then the kernel mounts a filesystem at the root of the VFS. This is either a ramdisk or immediately a filesystem on a partition on a hard drive. As it is added at the root of the VFS this partition is often refered to as the root filesystem.
Now here comes the part where the lines blur and we see that filesystems on storage devices and the kernel's VFS are actually two aspects of the same OS task:
With the mounting of a root filesystem, the VFS contains many files and directories, all of which exist on the root partition. However, every directory can become a "mount point". A mount point is where the VFS puts the entry point to a filesystem on a storage device. This means that whenever we mount a filesystem on a directory, we tell the VFS that instead of accessing the data stored in that directory, we would rather access the data on a different storage device. Mount points are usually empty directories, so that we don't make data unaccessible by mounting other filesystems on top.
When you install your OS it is up to you whether you want to put all data on one filesystem which then becomes your root filesystem, or you want to split your data between multiple filesystems. The latter requires your OS to mount all the individual filesystems, to make all data accessible. How you split things up is a question of how you design your system. This is why sometimes the directories you know from your installation are refered to as filesystems.
For the computers we usually have at home splitting your installation into multiple filesystems is not necessary anymore. Still there can be good reasons for doing so, but this is out of scope of this posting.
To keep the remainder of this posting short: Partitions are another means of structuring data on storage devices. With partitions one carves out contiguous storage space from a physical storage device and offers these as individual storage devices to the OS (on which one can put filesystems to mount into the VFS). One reason for doing this can be that one has only one hard drive, but wants to employ many different filesystems. The partition on which the root filesystem lives is often refered to as the root partition.
/root
, I think that's dismissable considering the complexity of the situation. – erikbstack Apr 01 '17 at 15:58