0Pricing
DevOps Bootcamp · Lesson

Navigating the Filesystem (cd, ls, pwd)

Master commands to move around directories, list contents, and know your current location within the Linux filesystem hierarchy.

Navigating the Filesystem (cd, ls, pwd) is a free DevOps Bootcamp lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Explore the Linux Filesystem

Navigating the filesystem is a core skill - like exploring a city of files and folders. Knowing where you are and how to move around underpins everything in the terminal.

Your Current Location: `pwd`

pwd (print working directory) tells you where you are - the full path of your current location. Run it below.

pwd

See What's There: `ls`

ls (list) shows the files and folders in your current location - like peeking inside a folder on your desktop. Try it below.

ls

Detailed View: `ls -l`

Add -l for a long listing: permissions, owner, size, and modification date for each item - far more detail than names alone.

ls -l

Reveal Hidden Files: `ls -a`

Linux hides "dotfiles" (names starting with .) used for config. Add -a to ls to reveal all files, hidden ones included.

ls -a

Change Directories: `cd` (Absolute Paths)

cd (change directory) moves you around. An absolute path starts from root / and gives the full location - like a full street address.

cd /usr/bin
pwd

Change Directories: `cd` (Relative Paths)

A relative path is based on where you are now. From /home/user, just cd Documents jumps you into /home/user/Documents.

cd ~
ls
cd Documents
pwd

Handy `cd` Shortcuts

Handy cd shortcuts: cd .. goes up to the parent, cd ~ jumps home, and cd - returns to your previous directory. Big typing savers.

pwd
cd /tmp
pwd
cd -
pwd
cd ..
pwd

Listing Other Directories

You can ls a path without moving into it - just pass the directory as an argument to peek at its contents while staying put.

pwd
ls ~/Documents

Filesystem Navigation Quiz

You are currently in your home directory (~/). Which of the following commands would allow you to see a hidden file named .profile located directly within your home directory?

Recap: Filesystem Navigation

Recap: pwd shows where you are, ls lists contents (-l details, -a hidden), and cd moves you via absolute paths, relative paths, or shortcuts.

Frequently asked questions

Is the “Navigating the Filesystem (cd, ls, pwd)” lesson free?

Yes — the full text of “Navigating the Filesystem (cd, ls, pwd)” is free to read here on the web, and the DevOps Bootcamp course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the DevOps Bootcamp course, upgrade to CoddyKit PRO.

What will I learn in “Navigating the Filesystem (cd, ls, pwd)”?

Master commands to move around directories, list contents, and know your current location within the Linux filesystem hierarchy. You practise DevOps Bootcamp with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start DevOps Bootcamp?

No prior experience is required. DevOps Bootcamp on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Navigating the Filesystem (cd, ls, pwd)” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this DevOps Bootcamp lesson?

Yes. Every DevOps Bootcamp lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Introduction to Linux & Terminal
  2. Navigating the Filesystem (cd, ls, pwd)
  3. File Management Basics (mkdir, cp, mv, rm)
  4. Tab Completion & Command History
← Back to DevOps Bootcamp