Skip to main content

UD06 - File Systems

Everything in GNU/Linux is a file.
This famous concept highlights the importance of understanding file systems and their management.

Unit Objectives

File System Structure

Understand hierarchical file organization in Windows and Linux

File System Types

Learn about different file systems and their characteristics

File Operations

Master file and directory manipulation commands

Links and Shortcuts

Create and manage symbolic links and hard links

Why This Matters

File systems are the foundation of data storage and organization. While both Windows and Linux use hierarchical structures of files and folders, they manage them differently:
  • File organization and structure
  • Access mechanisms and paths
  • Special directories and their purposes
  • Variables for accessing system locations
Most administrative work involves operations on the file system - managing permissions, data, backups, and configurations.

Key Concepts

File System Structure

File systems organize data in a tree structure:
  • Root: Starting point of the hierarchy
  • Directories (Folders): Containers for files and other directories
  • Files: Actual data storage
  • Paths: Routes to locate files and directories

Paths

Absolute Path:
  • Complete path from root
  • Windows: C:\Users\Admin\Documents\file.txt
  • Linux: /home/admin/Documents/file.txt
Relative Path:
  • Path from current location
  • ../Documents/file.txt
  • ./scripts/backup.sh

File System Types

Different file systems offer different features: Windows:
  • NTFS: Modern, supports permissions, encryption, compression
  • FAT32: Legacy, no permissions, limited file size
  • exFAT: For removable media
Linux:
  • ext4: Most common, reliable, journaling
  • xfs: High performance, large files
  • btrfs: Advanced features, snapshots
  • ZFS: Enterprise features, data integrity
Choosing the right file system depends on your needs: file size limits, permission support, performance requirements, etc.

Topics Covered

1

Windows File Structure

C:\ drive organization, Program Files, Users, Windows directory
2

Linux File Hierarchy

FHS (Filesystem Hierarchy Standard), important directories (/etc, /var, /home, /usr)
3

File Operations

Creating, moving, copying, deleting files and directories
4

Links and References

Symbolic links, hard links, shortcuts, and junctions
5

Practical Applications

Real-world scenarios combining file systems, permissions, and user management

Windows File System Highlights

Drive Letters

  • *C:* - Primary system drive
  • D:, E:, … - Additional drives, removable media

Important Directories

Applications available to all usersAccess via:
  • Variable: %PROGRAMFILES%
  • PowerShell: $Env:ProgramFiles
User-specific data and configurationsContains:
  • User documents
  • Application data (%APPDATA%)
  • Desktop and Downloads
  • User-specific software
Operating system files and librariesContains:
  • System32: Core system files
  • System executables
  • DLL libraries

Linux File System Highlights

Root Directory (/)

Everything starts from root (/).

Essential Directories

/home

User home directories (except root)

/root

Root user’s home directory

/etc

System configuration files

/var

Variable data (logs, databases)

/usr

User programs and libraries

/tmp

Temporary files (cleared on boot)

/dev

Device files

/boot

Boot loader files

File Operations

Common Tasks

TaskWindows (PS)Linux
List filesGet-ChildItemls
Change directorySet-Locationcd
Create directoryNew-Item -Type Directorymkdir
Copy fileCopy-Itemcp
Move fileMove-Itemmv
Delete fileRemove-Itemrm
View fileGet-Contentcat

Learning Outcomes

By the end of this unit, you will be able to:
  • Navigate file systems in Windows and Linux
  • Understand the purpose of important directories
  • Perform file operations via command line
  • Create and manage links
  • Choose appropriate file systems for different needs
  • Use file system variables and paths effectively
This unit builds on previous knowledge of users, groups, and permissions, showing how they all work together in file system management.

Build docs developers (and LLMs) love