File Systems
File systems organize how data is stored, named, and retrieved on persistent storage. They sit between the operating system and the raw blocks on a disk.
A file name is just a human-readable pointer to an inode. The inode stores metadata: size, ownership, permissions, timestamps, and pointers to data blocks.
| 1 | # Show inode number |
| 2 | ls -i file.txt |
| 3 | |
| 4 | # Inspect inode details |
| 5 | stat file.txt |
Journaling file systems like ext4 and NTFS record pending changes in a journal before applying them. If power is lost, the system can replay the journal and restore consistency quickly.
info
File systems enforce access rules based on users, groups, and ACLs. See the Linux permissions guide for practical commands.
The Virtual File System (VFS) layer gives Linux a uniform interface for many file systems. Mounting attaches a file system to a directory in the global tree.
| 1 | mount |
| 2 | findmnt |
| 3 | sudo mount /dev/sdb1 /mnt/backup |
| FS | Typical Use |
|---|---|
| ext4 | Default Linux file system |
| XFS | Large files and high throughput |
| Btrfs | Snapshots, RAID, advanced features |
| ZFS | Enterprise storage, checksums |
| NTFS | Windows default |
| APFS | macOS default |