11

I have a new catalina system and need compatibility with traditional linux. bash is a must. Following various references I did

    chsh -s /bin/bash

But not too happy:

(base) 19:44:28// $chsh -s /bin/bash
Changing shell for steve.
Password for steve:
chsh: no changes made

Why did that not work?

4 Answers4

5

Not sure why that approach didn't work, but I've never used that method myself. Try the Mac-way of doing it. Full details at https://www.howtogeek.com/444596/how-to-change-the-default-shell-to-bash-in-macos-catalina/, but basically go to System Preferences -> Accounts, unlock, ctrl-click on your acct name (Advanced Options), and change the shell!

jimtut
  • 1,714
2

The chsh command actually works fine. It overrides the setting in System Preferences... Users & Groups... [unlock, right-click user] Advanced Options. You can check that it has changed the default shell with a command like

echo $SHELL

and you can see what shell you're actually in with

echo $0

If there is still a difference between the two, it's probably due to the settings of your terminal program. For example, in the default Terminal, in Preferences... General, there's a setting for Shells open with that could be the reason you're still being dropped in an unwanted shell.

2

I was getting the "chsh: no changes made" message when trying to set the shell to zsh but my Terminal was still opening with bash. I checked System Preferences / Users & Groups / my-name / Advanced Options and the login shell was correctly at /bin/zsh.

The problem was Terminal's preferences, had "Shell opens with" set to /bin/bash. I changed this to "Default login shell" and it worked as expected.

Terminal Preferences

1

Ignore the "no changes made." You just need to exit the shell program. You can do this by pressing Command q. When you relaunch iTerm you can confirm the change by typing echo $SHELL.