1

Started using Monterey.

enter image description here

Changed the login shell from Users&Groups to use /opt/bin/homebrew/bash.

enter image description here

Default shell has been changed and the computer has been restarted.

echo '/opt/homebrew/bin/bash' | sudo tee -a /etc/shells
chsh -s /opt/homebrew/bin/bash

However, when open the terminal, it is still zsh.

enter image description here

Please advise how to start bash 5 (/opt/homebrew/bin/bash) immediately when opening the terminal.

7
  • 5
    Are your preferences in Terminal.app set to explicitly launch a shell, rather than using your login shell setting? This is a setting on the General tab. Nov 19, 2022 at 3:32
  • When you start a window or tab from Terminal.app, the shell to be started is specified in the preferences of the app. Aug 18, 2023 at 12:07
  • @user1934428 Terminal.app is perfectly happy to use whatever your login shell is. You don't have to, and probably shouldn't, specify the shell in Terminal.app preferences. That's really meant for starting some specific application. Aug 18, 2023 at 19:17
  • @MarcWilson : That's the point: In the preferences of Terminal.app, you can choose whether you want to have a login shell or whether you wan to specify your own shell. This selection can be done, as you said before, in the "General" tab of the preferences. The OP wants to start explicitly bash version 5, which he installed with homebrew. So IMO this would be best configured explicitly in the preferences. This is also easier to debug, then fiddling with changes in the login shell. BTW, isn't it risky to set the default login shell to one which is not part of what Apple officially distributes? Aug 19, 2023 at 11:33
  • 1
    @user1934428 Nothing risky about changing your default login shell. Mine has been set to Fish Shell for over 5+ years and never had an issue with the system doing its things in the background :)
    – AVelj
    Dec 15, 2023 at 3:14

1 Answer 1

1

Apparently the Users&Groups has no effect. What is it for?

Found the way.

  1. Start Terminal.
  2. Open Settings and got to General.
  3. Set the path to the installed bash path.

enter image description here

1
  • 2
    You found a way. Chainging the user's default shell works as it should in Monterey, but you can do it this way too. I'd use dscl localhost -read /Local/Default/Users/USERNAME shell and find out what the system thinks your default shell actually is. USERNAME being whatever your login name is. Nov 19, 2022 at 21:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .