DEV Community

Dan Higgins
Dan Higgins

Posted on

2 1 1

Day 2: “Where Am I?” – Understanding the Linux File System in RHEL 9

Welcome back, Linux explorer! Yesterday we met some of the terminal’s superheroes. Today, let’s answer a simple but crucial question you’ll ask a lot in Linux:

“Where the heck am I?”

In Linux, your file system is your world. And to navigate it like a pro, you need to understand a few basics — like where things are, how to get around, and what those strange slashes and dots mean.

📚 Table of Contents

The File System Is Like a Giant Tree

Think of the Linux file system as one big, upside-down tree:

  • The root is at the top: /
  • Everything else branches out beneath it: /home, /etc, /var, etc.
  • Your files live somewhere on one of those branches.

You're always somewhere in this tree — that location is called your current working directory.

Where Am I?

Use this command to find out where you are:

Image description

What it does: Prints your current working directory (aka your location). That means you're currently standing in the root account: /root.

How Do I Move Around?

Use cd to change directory:

Image description

That takes you to the /etc directory — home of all kinds of configuration files (Linux’s control panel, basically).

Magic Shortcuts:

  • cd ~ or just cd = go home (your home directory)
  • cd .. = go up one level
  • cd - = go back to your previous directory like Ctrl+Z for folders

What’s in This Folder?

Use ls to list the contents of the directory. Want more detail? Use the long format:

Image description

Want to see hidden files (those sneaky ones starting with .)? Use:

Image description

Want to do it all at once like a file system wizard?

Image description

Real World Practice: Your First Linux Walkabout

Try this little tour in your terminal:

Image description

Image description

Image description

Each command moves you somewhere or shows you something. It’s like Google Maps, but way cooler (and with fewer pop-ups).

Quick Gotchas for Beginners

  • Linux is case sensitive. /Home is not the same as /home.
  • Spaces in folder names? Use quotes:

Image description

Or escape the space:

Image description

Why This Matters

Understanding the Linux file system is like learning the layout of a city before driving in it. You could guess your way around, but it’s way faster (and less frustrating) if you know where you’re going.

Every command, every tool, every file you interact with depends on you knowing where you are — and how to get where you want to be.

Up Next (Day 3): We’ll learn how to create, view, and delete files — your first steps toward becoming a true Linux power user. Stay tuned!

Until then, open your terminal and go exploring — because the best way to learn Linux… is to get lost in it first!

Real Talk

Grasping these navigation commands might seem simple, but they lay the foundation for everything you'll do in Linux.

Whether you're installing software, troubleshooting issues, or scripting automation tasks, knowing how to move through the file system confidently is essential.

Reading about cd, ls, and pwd is great — but real understanding comes from using them. So don't just memorize; experiment.

Try poking around your directories, get comfortable with getting lost, and practice finding your way back.

It’s through this hands-on repetition that the commands will become second nature — and soon, navigating Linux will feel as natural as browsing folders on your desktop.

Top comments (0)