M06 - Navigation: CLI Translation
Navigation: CLI Translation
Translate basic GUI navigation into terminal navigation using the current directory, listing commands, absolute and relative paths, and a few high-value movement shortcuts.
- Use the terminal to know where you are, inspect what is around you, move with absolute and relative paths, and return quickly to recent locations.
From Visible Rooms to Typed Paths
In the GUI, you used folders visually.
In the terminal, you do the same work with paths and commands.
The concept is unchanged:
- you are always somewhere
- there is always something around you
- movement only makes sense relative to where you are now
That is the entire lesson.
Step 1: Know Where You Are
Before moving, confirm your current location.
Get-Location
pwd
If you feel lost, this is the first command to run.
Step 2: See What Is Here
Now inspect the current directory.
Get-ChildItem Get-ChildItem -Force
ls ls -la
The important concept is not the exact flag list yet. It is simply that listing gives you evidence before you move.
Step 3: Move with Relative and Absolute Paths
Relative paths
Relative paths start from where you are now.
Examples:
Documents..../Downloads
Absolute paths
Absolute paths start from the top of the tree.
Examples:
C:\Windows\System32/var/log
Fast rule
If the path starts from the top (C:\ or /), it is absolute. If it starts from the current location, it is relative.
Step 4: Change Directory
Use cd to move.
cd Documents cd .. cd C:\Windows cd $env:USERPROFILE
cd Documents cd .. cd /var/log cd ~
Slow is fine here. Correctness matters more than speed.
Two Shortcuts Worth Learning Early
Tab completion
Type the first few letters and press Tab.
This reduces spelling errors and teaches you the actual folder names faster than raw typing.
Jump back
If your shell supports it, cd - toggles back to the previous directory. That is one of the simplest useful movement shortcuts.
Optional but helpful: pushd and popd
Later, when you bounce between deep folders, pushd and popd help you leave and return without rebuilding the path in your head.
You do not need them on day one, but it is good to know they exist.
Common Beginner Mistakes
Watch for these:
- forgetting where you currently are
- typing a relative path when you meant an absolute one
- ignoring case on Linux
- assuming a folder exists because it exists on another machine
- using the wrong shell example for the wrong platform
When something fails, check the current directory first and read the path literally.
What To Do Right After This Lesson
Do not jump to unrelated file operations yet.
First do this progression:
lab-nav-01if basic movement still feels shakylab-nav-02if paths and symbols are the main hesitationlab-nav-03if listing output still feels noisy
That is the cleanest practice path from this lesson.
Before You Move On
You are ready if you can:
- tell where you are
- list what is around you
- move with
cd - explain whether a path is absolute or relative
That is the real threshold. Fancy shortcuts can wait.