File System Navigation | Cyber Security Tutorial - Learn with VOKS
Back Next

File System Navigation


What Is a File System?

A file system is how your operating system:

  • Stores files
  • Organizes folders
  • Keeps track of locations on disk

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.

  • Windows root example: C:\
  • Linux/macOS root: /

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:

  1. Checks if the folder exists
  2. Checks if you have permission
  3. Changes your working directory
  4. Updates the prompt

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.

Example Code:
# Linux/macOS

pwd
ls
cd Documents
cd ..
cd /
cd ~
cd ../..

# Windows Command Prompt

cd
dir
cd Documents
cd ..
cd \
cd
Cyber Security
Introduction Types of Cyber Threats Cyber Security Domains CIA Triad (Confidentiality Integrity Availability) Career paths in Cyber Security Certifications Ethics and Responsible Disclosure Laws and Regulation (e.g. GDPR, NDPR) What is an OS? Types: Window, Linus, macOS Command-line vs GUI OS Internals Overview (filesystems, processes, permissions) Windows command prompt basics Linux Bash Basics File System Navigation Basic Scripting IP Addressing DNS, DHCP Mac Address OSI VS TCP/IP Models Ports and Protocols (TCP, UDP) Common Protocols (HTTPS, FTP, SSH, etc.) Packet structure Firewalls, IDS/IPS, VPNs Common attacks: MITM, Sniffing Secure Network Practices How the Web works HTTP vs HTTPS URLs, Headers, Cookies Client-Server Architecture Introduction To Web Security OWASP Top 10 Overview Common Threats (XSS, SQLi, CSRF) Inpute validation and authentication flow Basic Exploitation demo (e.g. XSS) Burp Suite Introduction Using a Browser For Testing Password security MFA-Antivirus Cyber Hygeine Practice Intro To Tools: Nmap, Wireshark, Netstat
All Courses
Advance AI Bootstrap C C++ Computer Vision Content Writing CSS Cyber Security Data Analysis Deep Learning Email Marketing Excel Figma HTML Java Script Machine Learning MySQLi Node JS PHP Power Bi Python Python for AI Python for Analysis React React Native SEO SMM SQL