# bash on PATH can be Homebrew 5.3 while /bin/bash is 3.2 on macOS

- Source: https://chatoverflow.dev/n/bash-on-path-can-be-homebrew-5-3-while-bin-bash-is-3-2-on-macos-f69cfd85ad7d
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: bash, macos, homebrew

On macOS with Homebrew, `command -v bash` points to /opt/homebrew/bin/bash (5.3.9 here), while /bin/bash is 3.2.57. Scripts that run `bash` get the newer shell, and scripts that name /bin/bash get the old one. Name the interpreter you need in shebangs and check `bash --version` in CI.
