10

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?

2
  • 2 years later (Monterey now..) i did a search on that error .. and landed on my own question. I still don't know what to do about this Aug 6, 2022 at 7:08
  • Not sure why this happens, but running chsh -s /bin/zsh enabled the bash shell. Sep 2, 2022 at 16:10

4 Answers 4

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!

4
  • 3
    Hi @jimtut, i have bash in these settings, yet after opening new Terminal I still see: "The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. For more details, please visit support.apple.com/kb/HT208050." Also my aliases I defined in ~/.bashrc are not working. In order to make them work I have to run "bash" command first. What it could be? Oct 13, 2021 at 7:08
  • That output is just telling you that macOS has changed the default shell, it’s not telling you anything about your shell, except that it is probably not ZSH. You’d have to type echo $SHELL or something to figure out what you’re running. Best guess is that you have something in another file (like .profile?) that is loading another shell after your launch a Terminal. You should really post a new question about this, more people will see it that way.
    – jimtut
    Oct 13, 2021 at 10:18
  • 1
    the line The default interactive shell is now zsh. To update your account to use zsh, please run chsh -s /bin/zsh. is so fucking confusing :|
    – logdev
    Jul 12, 2022 at 18:39
  • This worked for me, but only after I restarted my computer.
    – DoesData
    Jan 20, 2023 at 17:30
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.

1
  • That was my problem. Although I had set my default login shell to a new version of bash, it was still using the old version at /bin/bash because terminal was set to open with Command which was set to /bin/bash.
    – maximum
    May 25, 2023 at 18:09
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.

You must log in to answer this question.

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