What Is a File System?
A file system is how your operating system:
Think of it like a tree structure.
Example:
Root ├── Users │ ├── Alice │ │ └── notes.txt │ └── Bob └── Program Files
Everything starts from a top-level directory called the root.
C:\/Key Terms You Must Understand
Directory = Folder
File = Document or program
Path = The location of a file or folder
Example path (Windows):
C:\Users\John\Documents\file.txt
Example path (Linux/macOS):
/home/john/Documents/file.txt
A path tells the system exactly where something is located.
Absolute vs Relative Paths
Absolute Path
Starts from the root.
Examples:
Windows:
C:\Users\John\Documents
Linux/macOS:
/home/john/Documents
Relative Path
Starts from your current location.
Example:
Documents
If you are already inside /home/john, then Documents means:
/home/john/Documents
Viewing Where You Are
Linux/macOS:
pwd
This means: Print Working Directory.
Windows (Command Prompt):
cd
It shows your current location.
Listing Files and Folders
Linux/macOS:
ls
Windows:
dir
These commands show what is inside your current folder.
Moving Between Folders
The most important command is:
cd
cd = change directory
Move Into a Folder
Linux/macOS:
cd Documents
Windows:
cd Documents
Move Back One Level
cd ..
The two dots .. mean "go up one folder."
Move to Root
Linux/macOS:
cd /
Windows:
cd \
Move to Home Directory (Linux/macOS)
cd ~
The ~ symbol means your home folder.
Special Navigation Symbols
. = Current directory
.. = Parent directory
~ = Home directory (Linux/macOS)
Example:
cd ../..
This moves up two levels.
Tab Auto-Completion
In most terminals, you can press the TAB key to auto-complete folder names.
Example:
If you type:
cd Doc
Then press TAB, it may complete to:
cd Documents
This saves time and prevents mistakes.
Example Navigation Session (Linux/macOS)
pwd ls cd Documents ls cd .. cd / pwd
Example Navigation Session (Windows)
cd dir cd Documents dir cd .. cd \ cd
How the System Actually Handles Navigation
When you type:
cd Documents
The operating system:
Your files are not moving. Only your location changes.
Think of it like walking inside a building. The building stays the same, but your position changes.
# Linux/macOS
pwd
ls
cd Documents
cd ..
cd /
cd ~
cd ../..
# Windows Command Prompt
cd
dir
cd Documents
cd ..
cd \
cd