Comparing Linux and Windows file structures


🗂 1. Drives and File Systems

Windows

  • Windows assigns each drive or partition a letter, such as:
    • C: → the main system drive
    • D: → a second hard drive or DVD drive
    • E: → a USB drive, etc.
  • Each drive has its own separate root directory, e.g.:
    • C:\Windows
    • D:\Music

So in Windows, the letter defines a separate file tree.


Linux

  • Linux does not use drive letters.
  • Instead, it uses a single unified file hierarchy, starting from a single root directory: / Everything—no matter which drive or partition it comes from—is placed somewhere inside this tree.
  • Other drives or partitions are mounted into this hierarchy at specific locations called mount points.
  • Examples:
    • / ← root filesystem (usually on the main drive)
    • /home ← might be on another partition
    • /mnt/usb ← a mounted USB stick
    • /media/cdrom ← a mounted CD-ROM

So when you mount a new drive, you “attach” it somewhere in the directory tree, rather than giving it a letter.


🔠 2. File and Directory Names (Case Sensitivity)

Windows

  • Case-insensitive (mostly):
    • Document.txt, document.txt, and DOCUMENT.TXT are considered the same file.
  • Windows file systems (NTFS, FAT32) preserve case, but the OS generally doesn’t distinguish it.

Linux

  • Case-sensitive:
    • Document.txt, document.txt, and DOCUMENT.TXT are different files.
  • This applies everywhere, including filenames, directory names, and commands.

Example:

cd /Home   # Error if the directory is actually /home

🧩 3. File Paths and Separators

ConceptWindowsLinux
Path separatorBackslash \Forward slash /
Root directoryDrive letter + :\ (e.g. C:\)Single /
Example pathC:\Users\Peter\Documents/home/peter/documents

Linux paths look simpler, and / is consistent across all systems (including macOS).


🔒 4. Permissions and Ownership

  • Linux uses ownership and permissions (user/group/other + read/write/execute flags).
    Example: -rw-r--r-- user group file.txt
  • Windows uses Access Control Lists (ACLs), which are more complex but conceptually similar.

⚙️ 5. Drives in Practice

To see drives in Linux:

lsblk

This shows block devices like:

sda
├─sda1
├─sda2
sdb
└─sdb1

These represent physical devices (/dev/sda, /dev/sdb) and their partitions (/dev/sda1, etc.).
You mount them to directories like /mnt or /media to access their contents.


🔍 Summary

FeatureWindowsLinux
DrivesIdentified by letters (C:, D:)Mounted into / hierarchy
RootC:\ (or other letter)/
Case sensitivityNoYes
Path separator\/
Drive mountingAutomatic letter assignmentManual or automatic mount point
File permissionsACLsrwx (user/group/other)

Leave a Comment

Licensed under CC BY-NC 4.0

DevOps viewpoints are those of its owner. You may share and adapt this article for non-commercial purposes, provided proper attribution is given. Attribution should include:

Title: Comparing Linux and Windows file structures
Author: peter arthur martin
Original URL: https://www.woodcentral.com/-/peter/comparing-linux-and-windows-file-structures/
License: CC BY-NC 4.0

Site Index

👍 This page answered my questions

Your vote helps other woodworkers quickly find the answers and techniques that actually work in the shop.