The command search path, called PATH, is a list of directories the shell searches to find programs. The terminal is the window where you type; the shell inside it interprets what you type. When you enter `ls`, the shell finds the `ls` program through PATH, runs it, and the terminal displays its output. section 1.7.5
This matters after installing a tool: Homebrew can be installed while your shell still does not know where to find it. Add Homebrew’s location to PATH using the commands shown at the end of its installer output. Copy the commands with your own username, not the placeholder shown here. section 2.2.3
==> Next steps:
- Run these commands in your terminal to add Homebrew to your PATH:
echo >> /Users/yourname/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/yourname/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
The first two commands save the setup line in `.zprofile` for new terminal windows. The third applies it immediately, without restarting the terminal. section 2.2.3
