Effects of changing shell

bashcommand lineterminalzsh

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?

Best Answer

  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.

OR

  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.

OR BEST

  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.