whatis path
PATH
Also known as: $PATH
The environment variable listing, colon-separated, the directories the shell searches when you run a command by name.
What Is the PATH Variable in Linux?
When you type ls, the shell walks each directory in $PATH from left to right and runs the first executable named ls it finds. "command not found" means no directory in PATH contains it.
To add a directory, prepend or append it: export PATH="$HOME/.local/bin:$PATH". Use which or type -a to see which copy of a command wins.
Example
echo "$PATH" | tr : "\n"
type -a python3 Learn more about PATH
- Environment Variables and PATH Explained Environment variables control how your shell and the programs it launches behave, and PATH is the most important one, determining which commands your system can find. This guide covers viewing, setting, and permanently persisting environment variables.