Bash on Mac

From NovaOrdis Knowledge Base
Revision as of 19:18, 21 February 2021 by Ovidiu (talk | contribs) (→‎Internal)
Jump to navigation Jump to search

Internal

bash Version on Mac

A specific bash executable is picked like any other executable, by scanning the PATH and using the first match. To force a specific bash version, ensure the directory it exists in comes first in PATH.

For example, a brew-installed bash (5.0.17) is picked from /usr/local/bin because /usr/local/bin precedes /bin in PATH.

The original Mac bash binary is available in /bin/bash, even if brew installs a newer version.

To force the native bash to be used, ensure /bin precedes /usr/local/bin in PATH.