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