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
- 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
- ext4: Most common, reliable, journaling
- xfs: High performance, large files
- btrfs: Advanced features, snapshots
- ZFS: Enterprise features, data integrity
Topics Covered
Linux File Hierarchy
FHS (Filesystem Hierarchy Standard), important directories (/etc, /var, /home, /usr)
Windows File System Highlights
Drive Letters
- *C:* - Primary system drive
- D:, E:, … - Additional drives, removable media
Important Directories
C:\Program Files
C:\Program Files
Applications available to all usersAccess via:
- Variable:
%PROGRAMFILES% - PowerShell:
$Env:ProgramFiles
C:\Users
C:\Users
User-specific data and configurationsContains:
- User documents
- Application data (%APPDATA%)
- Desktop and Downloads
- User-specific software
C:\Windows
C:\Windows
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
| Task | Windows (PS) | Linux |
|---|---|---|
| List files | Get-ChildItem | ls |
| Change directory | Set-Location | cd |
| Create directory | New-Item -Type Directory | mkdir |
| Copy file | Copy-Item | cp |
| Move file | Move-Item | mv |
| Delete file | Remove-Item | rm |
| View file | Get-Content | cat |
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.