M06 - 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.

File System

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.

45 min BEGINNER BOTH
What you should learn
  • Translate basic GUI navigation into terminal navigation using the current directory, listing commands, absolute and relative paths, and a few high-value movement shortcuts.
Visual model

Concept to practice path

Each lesson is meant to move from an idea, to an example, to a safe practice step.

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.

Visual model

Translate the same location into CLI language

Windows path C:\\Users\\YourName\\Documents

The shell can jump directly to the path once you know the address.

Linux path /home/yourname/Documents

The shell uses the same idea: path first, then movement from the current directory.

CLI navigation is not a new universe. It is the same map you already saw in the GUI, expressed more directly.


Step 1: Know Where You Are

Before moving, confirm your current location.

Where am I?

Get-Location

Where am I?

pwd

If you feel lost, this is the first command to run.


Step 2: See What Is Here

Now inspect the current directory.

What is here?

Get-ChildItem Get-ChildItem -Force

What is here?

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.

Windows Movement

cd Documents cd .. cd C:\Windows cd $env:USERPROFILE

Linux Movement

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:

  1. lab-nav-01 if basic movement still feels shaky
  2. lab-nav-02 if paths and symbols are the main hesitation
  3. lab-nav-03 if 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.

Learning loop

Recall it, check it, then practice it.

Do this before moving on. It turns reading into memory and safer action.

Recall
  • Can you explain the difference between absolute and relative paths and then use both?
  • Can you move into a folder, back out, jump home, and describe why each step worked?
Check
  • Use `pwd` or `Get-Location`, list contents, move with `cd`, and explain why the path worked.
  • Use a movement shortcut such as tab completion, `cd -`, or `pushd` and explain when it saves effort.

What to do next

Best next step Practice

Use the matching lab or keep building skill in practice.

Open now