Stage 2 · Lesson 7 of 9
PATH and "command not found"
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
- CourseFreeThe Missing Semester of Your CS Education
MIT · Beginner
MIT's lectures on the shell and shell tools, with exercises after each one
- BookFreeThe Linux Command Line
William Shotts · Beginner
A free book that explains the shell step by step; the first part covers this whole stage
Practise
Keep handy
Also worth your time
- roadmap.sh: Shell / BashGo deeper
The full map of shell and Bash topics, to see what comes after the basics