shell profile
A startup file the shell runs when it opens, used to set PATH and other settings for every session.
In more detail
For zsh on a Mac, a login shell reads ~/.zprofile, which is where the python.org installer and Homebrew add their PATH lines. Changes take effect in new terminal windows, not ones already open. Bash uses ~/.bash_profile and ~/.bashrc instead.
Example
eval "$(/opt/homebrew/bin/brew shellenv)"Related terms
- zsh — An interactive shell close to bash in syntax, and the default login shell on macOS since Catalina (10.15).
- PATH — An environment variable holding a list of folders the shell searches, in order, to find the program for a command you type.
- eval — A shell builtin that joins its arguments into one string and runs that string as a command, as if you had typed it.
- Homebrew — A popular package manager for macOS and Linux, run with the brew command, which installs software into its own directory.
Taught in
- Installing Python On A Mac — Hands-on Python: Complete Video Course & Book