Linux

Chapter 2: Navigating the Linux File System in WSL Ubuntu

Chapter 2: Navigating the Linux File System in WSL Ubuntu

Now that you’ve installed Ubuntu via WSL and launched your Linux terminal, it’s time to get comfortable using it. The first thing you’ll notice is that the Linux terminal is all about commands — and most of those involve navigating the file system.

This chapter will guide you through the Linux file system structure and the most commonly used navigation commands. Whether you’re coming from Windows or macOS, this will feel new — but very logical once you get the hang of it.

📁 Understanding the Linux File System

Linux doesn’t use drive letters like Windows (C:\, D:\). Instead, it has a single root directory / that branches out into various folders. Here’s a quick breakdown:

  • / – Root directory (like C:\)
  • /home/username – Your personal user directory
  • /etc – System and application configuration files
  • /usr – System applications and libraries
  • /var – Logs, variable data
  • /bin – Essential command binaries
  • /mnt/c – Mounted C: drive from Windows

In WSL, your Windows drives are accessible from the /mnt directory, such as:

/mnt/c/Users/YourName/Desktop

🧭 Basic Navigation Commands

📌 1. pwd – Print Working Directory

Shows the full path of your current directory.

pwd

Output:

/home/yourusername

📌 2. ls – List Files and Folders

Displays the contents of the current or specified directory.

ls
ls -l
ls -a
ls -la

📌 3. cd – Change Directory

Navigate to another directory:

cd /etc
cd ~           # Home directory
cd ..          # Go up one level
cd /mnt/c      # Go to Windows C drive

📌 4. clear – Clear the Terminal

Clears all the current text in your terminal window.

clear

📌 5. exit – Exit the Terminal

Closes your Ubuntu WSL session.

exit

🧪 Quick Practice

  • Open Ubuntu from your Start Menu
  • Try these commands in order:
pwd
ls
cd /etc
ls -la
cd ..
pwd
cd ~
cd /mnt/c/Users
ls

❓ Common Questions

🔸 Q: Where am I when Ubuntu opens?

A: You’re usually in /home/yourusername, your personal folder (like C:\Users\YourName in Windows).

🔸 Q: Can I use tab for autocompletion?

A: Yes! Type part of a directory or file name and hit Tab to autocomplete.

🔸 Q: What if I want to return to the home folder quickly?

A: Use cd or cd ~

✅ Summary

  • Linux uses a single-root file system (no C:\ or D:\)
  • You can use cd, ls, and pwd to navigate
  • Windows drives are mounted under /mnt/
  • Practice is key — use your terminal often

▶️ Coming Up Next

Chapter 3 – File & Directory Management in Linux
You’ll learn how to create, move, copy, delete, and manage files and folders using the terminal — Linux style!

Leave a Reply

Your email address will not be published. Required fields are marked *