File systems and disk structures are essential components of data storage in computers. They define how data is stored, organized, retrieved, and managed on disks. This guide introduces the basic concepts of file systems and how disk structures work under the hood.
A file system is a method and data structure that the operating system uses to control how data is stored and retrieved. Common file systems include:
Disks are divided into:
Each partition can have its own file system.
Operating systems must mount a file system to access it:
# Linux
mount /dev/sda1 /mnt
# Windows
Automatically mounts C:, D:, etc.
Formatting prepares a disk for use with a specific file system:
mkfs.ext4 /dev/sdb1 # Linux
format D: /FS:NTFS # Windows (command line)
Modern file systems like NTFS and ext4 use journaling to improve reliability by recording changes before they're committed. This helps recover from crashes.
Remote storage can be accessed via:
Explore disk partitions and file system types on your machine. Tools like lsblk
, fdisk
, or Disk Management
(Windows) are great for this. Understanding file systems is crucial for system administration, forensics, and data recovery.