Out of the box, MacOS Sequoia uses an older version of bash, to use an
up-to-date version install bash via Homebrew and then set your shell to the
Homebrew version.
bashbrew install `bash`
bash executablels "$(brew --prefix)/bin/bash"
On Apple Silicone this will return something like
/opt/homebrew/bin/bash
cat /etc/shells
Which will show a list like
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
bash to shells listecho "$(brew --prefix)/bin/bash" | sudo tee -a /etc/shells;
Verify that the append worked
cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
/opt/homebrew/bin/bash
bashchsh -s "$(brew --prefix)/bin/bash"
Enter your password when prompted.
In order for the new shell to be used, you will have to quit and restart your
terminal. Afterward you can verify your new bash version.
echo $BASH_VERSION