Skip to main content

Command Palette

Search for a command to run...

Essential Navigation Techniques

Published
3 min readView as Markdown

Day 4/14 of Linux 101 series: Basic Navigation

Today we master moving around the Linux filesystem like a pro 🧵

  1. The Linux filesystem structure:

Everything starts from root: / Unlike Windows (C:, D:), Linux has ONE unified tree. All drives, USB, everything mounts under this single tree. Your personal files: /home/username Programs: /bin, /usr/bin Configuration: /etc

One tree to rule them all.

  1. Understanding paths:

Two types of paths:

Absolute path: Starts from root (/) Relative path: Starts from current location

Example:

Absolute: /home/username/Documents/file.txt Relative: Documents/file.txt (if you're in /home/username).

Know the difference. It matters.

  1. The cd command (Change Directory):

cd /home/username/Documents - Go to absolute path cd Documents - Go to relative path cd .. - Go up one level cd ../.. - Go up two levels cd ~ - Go to home directory cd - - Go to previous directory

These shortcuts save massive time.

  1. The ls command (List files):

ls - List files in current directory ls -l - Long format (detailed info) ls -a - Show hidden files (files starting with .) ls -la - Combine both (long + hidden) ls -lh - Human readable sizes (KB, MB, GB)

You'll use ls -la more than anything else.

  1. Special directory symbols:

. (single dot) - Current directory .. (double dot) - Parent directory ~ (tilde) - Home directory / (slash) - Root directory

  • (dash) - Previous directory

Master these and navigation becomes second nature.

  1. Absolute vs Relative paths - When to use:

Absolute paths:

Scripts that need to work from anywhere. When you're unsure of current location. Clearer for beginners.

Relative paths:

Faster to type More flexible. Professional workflow. Start with absolute, graduate to relative.

  1. Real examples - Practice these:

pwd - Where am I? cd /home - Go to /home ls - What's here? cd username - Go into your user folder pwd - Confirm: /home/username cd Documents - Go to Documents cd .. - Back to /home/username cd ~ - Jump to home instantly

Type these 10 times. Build muscle memory.

  1. Pro tips for faster navigation:

Tab completion:

Type "Doc" + Tab → autocompletes to "Documents". Up arrow: Recalls previous commands. Ctrl+R: Search command history. cd without arguments: Takes you home.

Use Tab ALWAYS - it prevents typos.

  1. Common beginner mistakes:

❌ cd /home /username - Space breaks it ✅ cd /home/username

❌ CD Documents - Linux is case-sensitive ✅ cd Documents

❌ Forgetting where you are ✅ Use pwd constantly

Case matters. Spaces matter. Location matters.

  1. Practice challenge for today:

  2. pwd (note your location)

  3. cd / (go to root)

  4. ls (see root directories)

  5. cd home (go to home)

  6. cd username (replace with yours)

  7. ls -la (see all files)

  8. cd Documents

  9. cd .. (go back)

  10. cd ~ (jump home)

  11. pwd (confirm you're home)

Repeat until it feels natural.