简体   繁体   中英

Recover terminal commands after macOS Catalina install switches from bash to zsh

I recently updated my Macbook to macOS Catalina. Terminal now runs with zsh instead of bash , and many familiar commands no longer work. For example:

conda list
zsh: command not found: conda

First I tried the change shell approach:

chsh -s /bin/bash
Changing shell for michaelboles.

No error raised, and looking in "Users and Groups" confirms that Login shell: /bin/bash . I can also try the same chsh command again, and it says chsh: no changes made , suggesting the first change was successful.

But when I try again:

conda list
zsh: command not found: conda

So I looked into an alternative -- install bash with brew . Following this, I tried:

brew install bash
zsh: command not found: brew

Even when I'm using a bash shell, it's raising zsh errors!

Please help me change it back to the old, functioning bash Terminal I've been using, or get zsh to work as bash did for me earlier.

Looks like I just needed to copy some text from my ~/.bash_profile to ~/.zshrc as described here . Now everything works again!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM