LAB-NAV-01 - First Steps: pwd, ls, cd
First Steps: pwd, ls, cd
Confidently navigate the Linux file system using pwd, ls, and cd - the three commands you will use constantly.
- Use pwd, ls, and cd without guessing.
- Repeat the workflow without copy-paste or step-by-step prompting.
Part A: The Field Guide
What and Why
Before you edit files, install software, or debug anything, you need three answers:
- Where am I?
- What is here?
- How do I move?
Those questions map directly to three commands:
pwdlscd
If these three feel unstable, everything else in Linux feels harder than it should.
Mental Model
Think of the Linux file system as rooms connected by doors.
pwdtells you which room you are in.lsshows what is inside the room.cdwalks through a door into another room.
Do not rush this. Reliable movement is more important than speed.
Command Reference
pwd
Shows your current working directory.
pwd
ls
Shows what is inside the current directory.
ls ls -a ls -la
cd
Changes your location.
cd Documents cd .. cd / cd ~ cd -
One useful habit
If something feels wrong, run pwd first. Many beginner mistakes are really location mistakes.
Common Beginner Failure Points
Watch for these:
- assuming you are in your home directory when you are not
- forgetting that Linux is case-sensitive
- thinking a directory is empty because you forgot
ls -a - typing
cdinto a folder name that does not exist on this machine
That is why verification matters after every move.
Part B: The Drill Deck
You need a Linux terminal for these exercises. WSL, a VM, or a Linux machine is fine.
G Guided Step by step - type exactly this and compare the result >
Exercise G1: Find yourself
- Open your terminal.
- Run
pwd. - Say out loud what directory you are currently in.
Exercise G2: Look around
- Run
ls. - Run
ls -a. - Notice what appeared only after using
-a.
Exercise G3: Move and verify
- Run
cd /tmp. - Run
pwd. - Run
cd ... - Run
pwdagain. - Run
cd ~. - Run
pwdone more time.
Exercise G4: Toggle back
- Run
cd /var. - Run
cd -. - Run
cd -again. - Explain what happened.
S Solo Task described, hints available - figure it out >
Exercise S1: Build a short path trail
Visit these in order and verify each with pwd:
- your home directory
/tmp/etc/var/log- back home without typing the full home path
Exercise S2: Inspect without moving blindly
- Go to your home directory.
- Use
lsto inspect/etcwithout entering it. - Use
ls -ain your home directory. - Identify one hidden file or folder.
Exercise S3: Basic confidence check
Without looking back at the lesson, explain:
- what
pwdtells you - what
ls -aadds - what
cd ..means - what
cd ~means
M Mission Real scenario - no hints, combine multiple skills >
Mission M1: Build a machine map
Starting from /, use only pwd, ls, and cd to inspect these places:
/etc/var/home- your own home directory
Then answer: which location looks like configuration, which looks like logs or changing data, and which is personal user space?
Mission M2: The no-guessing loop
Practice this until it feels calm and repeatable:
pwdcd /var/logpwdlscd -pwd
The goal is not speed. The goal is knowing where you are at every step.