Linux, terminal and Git

Stage 2 · Lesson 7 of 9

PATH and "command not found"

Shell basics

When you type a command name, the shell has to find the program. PATH is the list of folders it searches, in order, separated by colons. echo $PATH shows the list.

which node or type node tells you which file will actually run, and command -v does the same job inside scripts. If you install a tool and then see "", the program usually exists. Its folder is just not on PATH yet, or your shell has not reloaded its .

Order matters: the first match wins. That is exactly how switch between versions.

Common trapfixing PATH by pasting lines into several startup files until nobody can tell which one wins.

A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it

Resources for this stage

Start with· follow one of these

Practise

  • A game played over SSH where each level needs a new command, from `ls` to finding hidden files

Keep handy

  • Paste any command and see what each part does before you run it

  • Short, example-first help pages for common commands when a man page is too long

Also worth your time

Mark this stage as not done?