Recently Apple changed the default shell to zsh from bash. In the past I made significant changes to my .bashrc file. How should I incorporate those changes into the zsh terminal?

1 Answer 1

  1. Stay with bash and install a newer bash with brew (v5.0.11 instead of Apple's bash v3.2.57). Add the path to brew's bash to /etc/shells. In the advanced options of the System Preferences > Users & Groups > (alt-click) your user > login shell change the login shell to brew's bash. Some things may break though.


  1. Start using zsh: move the POSIX-compliant .bashrc content to .profile and source this file in .zshrc like this:

    [[ -e ~/.profile ]] && emulate sh -c 'source ~/.profile'

    Some things may break though.


  1. Start from scratch and learn how to configure zsh. A lot of things in your .bashrc like aliases and env variables should work in .zshrc though.

There is no Google translator from bashin to zshlish. If you don't post the content of your .bashrc (we still can't look over your shoulder!), we won't be able to tell what may go wrong.

  • 1
    I would like to add that MacPorts provide various bash versions as well, and I have had better experience with MacPorts when it comes to package quality and long term stability. Oct 12, 2019 at 7:35

You must log in to answer this question.

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