Catalina osx 10.15 bashrc fix

After installing osx 10.15 my .bash_profile stopped working. When I open a new terminal it says:

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 https://support.apple.com/kb/HT208050.

I tried changing to zsh and was fine. But since my .bashrc has code not compatible with zsh, I switched over back to bash. Here are the steps to make sure bash reads your .bashrc file.

1. Install brew.
2. brew install bash
3. Open Terminal -> Preferences -> Profiles -> click on your default one -> Shell -> check “Run command” and paste exec /usr/local/bin/bash –init-file $HOME/.bashrc
4. Close the Profiles window
5. Open a new terminal

If all goes well, you will see the terminal executes the command you pasted, and your .bashrc settings should be in the environment. Check using env | sort.

ref: https://stackoverflow.com/questions/56784894/macos-catalina-10-15beta-why-is-bash-profile-not-sourced-by-my-shell

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s