A file system consists of 3 layers
The Logical File System acts as the interface between the user applications and the file system itself. It facilitates essential operations such as opening, reading, and closing files. Essentially, it serves as the user-friendly front-end, ensuring that applications can interact with the file system in a way that aligns with user expectations.
The Virtual File System (VFS) is a crucial layer that enables the concurrent operation of multiple instances of physical file systems. It provides a standardized interface, allowing different file systems to coexist and operate simultaneously. This layer abstracts the underlying complexities, ensuring compatibility and cohesion between various file system implementations.
The Physical File System is responsible for the tangible management and storage of physical memory blocks on the disk. It handles the low-level details of storing and retrieving data, interacting directly with the hardware components.
Journaling - Journaling file systems keep a log called the journal that keeps track of the changes made to a file, but not yet permanently committed to the disk. In case of system failures, lost changes can be brought back using the journal.
Versioning - Version file systems store previously saved versions of a file. Backups are created from storing copies of the file based on previous commits in a timely manner.
Inode - The index node is the representation of any file or directory based on the parameters such as size permission, ownership, and location of the file.


Despite its earlier issues, it has tail packing as a scheme to reduce internal fragmentation. It uses a B+ Tree that gives less than linear time in directory lookups and updates. It was the default file system in SUSE Linux till version 6.4, until switching to ext3 in 2006 for version 10.2.
Used as the default file system for many Linux distributions. It provides features like snapshots, online defragmentation, sparse files, variable block sizes, and excellent capacity. It also excels at parallel I/O operations.
However, it is not widely adapted or supported on many Linux distributions.
The fourth ext developed in 2006, is a journaling file system. It has backward compatibility with ext3 and ext2 and it provides several other features, some of which are persistent pre-allocation, unlimited number of subdirectories, metadata checksumming and large file size. ext4 is the default file system for many Linux distributions and also has compatibility with Windows and Macintosh.
btrfs provides many features such as snapshotting, drive pooling, data scrubbing, self-healing and online defragmentation. It is the default file system for Fedora Workstation.
This is a copy-on-write file system that was first announced in 2015 with the goal of performing better than btrfs and ext4. Its features include full filesystem encryption, native compression, snapshots, and 64-bit check summing.
Linux also has support for file systems of operating systems such as NTFS and exFAT, but these do not support standard Unix permission settings. They are mostly used for interoperability with other operating systems.
<aside> âť“ ext4 has been the main file system developers use despite other systems being better such as btrfs and XFS; but why?
</aside>
ext4 was designed to be backward compatible with ext3 and ext2. It’s better than the previous generations in the following ways:
Ext4 does not guarantee the integrity of your data. If the data is corrupted while already on disk then it has no way of detecting or repairing such corruption.
It cannot secure deletion of files, which is supposed to cause overwriting of files upon deletion. This results in sensitive data ending up in the file-system journal.
XFS performs highly well for large filesystems and high degrees of concurrency. So XFS is stable, yet there’s not a solid borderline that would make you choose it over ext4 since both work about the same. Unless you want a file system that directly solves a problem of ext4 like having capacity > 50TiB.
Despite btrfs offering features like multiple device management, per-block checksumming, asynchronous replication and inline compression, it does not perform the best in many common use cases as compared to ext4 and XFS. Several of its features can be buggy and result in reduced performance and data loss.
The ls command along with its -l (for long listing) option will show you metadata about your Linux files, including the permissions set on the file.
$ ls -l
drwxr-xr-x. 4 root root 68 Jun 13 20:25 tuned
-rw-r--r--. 1 root root 4017 Feb 24 2022 vimrc
Breakdown of drwxr-xr-x:
Octal values are numbers that represents permissions. Each permission has a numeric value assigned to it.
For example: If a file has the permissions of drwxr-xr-x the octal value would be 755.
Here is a table of values:
| --- | --- | --- |
There is two ways to change file permissions, symbolic mode or octal values
Symbolic mode is a procedural way to change permissions. Meaning it performs the instructions you give. To change permissions using symbolic mode, follow the equation below:
Users(u) or Group(g) or Others(o) +- read(r) or write(w) or execute(x)