upgrade bash on M1 but cannot change to the new bash

I installed new bash via brew

brew install bash
which bash # /opt/homebrew/bin/bash
chsh -s /opt/homebrew/bin/bash

I have added /opt/homebrew/bin/bash to /etc/shells

$ bash --version
GNU bash, version 5.1.8(1)-release (aarch64-apple-darwin20.4.0)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

however, in the terminal, I'm still staying in bash3.2.

echo ${BASH_VERSION} # still being 3.2.57(1)-release

Solution 1:

What you've done -should- work.

Might want to verify the contents of /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

and retry changing the shell:

Scot-MBP:~ sfederman$ chsh -s /opt/homebrew/bin/bash
Changing shell for sfederman.
Password for sfederman:
chsh: no changes made

then testing:

Scot-MBP:~ sfederman$ which bash
/opt/homebrew/bin/bash
Scot-MBP:~ sfederman$ echo ${BASH_VERSION}
5.1.8(1)-release