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. This is lesson 2 of 4. Any 3 lessons of this learning path are free to read in full — after that, CoddyKit PRO unlocks every lesson, plus hands-on practice with a built-in code editor and a 24/7 AI tutor. It is part of the DevOps Bootcamp learning path, and your progress syncs across the web and the CoddyKit app. The DevOps Bootcamp course includes 4 lessons in total.
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.
pwdSee 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.
lsDetailed 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 -lReveal 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 -aChange 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
pwdChange 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
pwdHandy `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 ..
pwdListing 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 ~/DocumentsFilesystem 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.
Learn DevOps Bootcamp with an AI tutor — free
Write and run real code in your browser, get instant help from a 24/7 AI tutor, and pick up where you left off on the web or in the app.
- Courses
- 142
- Lessons
- 568
Frequently Asked Questions
Is the “Navigating the Filesystem (cd, ls, pwd)” lesson free?
Yes — any 3 lessons of the DevOps Bootcamp learning path, including “Navigating the Filesystem (cd, ls, pwd)”, are free to read in full here on the web. After that, CoddyKit PRO unlocks every lesson, plus interactive practice with a built-in code editor and a 24/7 AI tutor. The DevOps Bootcamp course includes 4 lessons in total.
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, so you can start here or from the beginning and move at your own pace. This is lesson 2 of 4.
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
- Introduction to Linux & Terminal
- Navigating the Filesystem (cd, ls, pwd)
- File Management Basics (mkdir, cp, mv, rm)
- Tab Completion & Command History