Adding a new entry to the PATH variable in ZSH

Here, add this line to .zshrc: EDIT: This does work, but ony’s answer below is better, as it takes advantage of the structured interface ZSH provides for variables like $PATH. This approach is standard for bash, but as far as I know, there is no reason to use it when ZSH provides better alternatives.

Is there anything in Zsh like .bash_profile?

Yes, it’s called ~/.zshenv. Here’s how I have $JAVA_HOME set in ~/.zshenv: Keep in mind, however, that zsh is not bash, so just ’cause you have to source your .bash_profile every time you open a terminal does not mean that you have to do that with zsh. With zsh, I only have to re-source my ~/.zshenv when I make changes to it, and then only for terminals which … Read more

commands not found on zsh

It’s evident that you’ve managed to mess up your PATH variable. (Your current PATH doesn’t contain any location where common utilities are located.) Try: Alternatively, for “resetting” zsh, specify the complete path to the shell: or

Where to place $PATH variable assertions in zsh?

tl;dr version: use ~/.zshrc And read the man page to understand the differences between: ~/.zshrc, ~/.zshenv and ~/.zprofile. Regarding my comment In my comment attached to the answer kev gave, I said: This seems to be incorrect – /etc/profile isn’t listed in any zsh documentation I can find. This turns out to be partially incorrect: … Read more

Conda command not found

If you’re using zsh and it has not been set up to read .bashrc, you need to add the Miniconda directory to the zsh shell PATH environment variable. Add this to your .zshrc: Make sure to replace /home/username/miniconda with your actual path. Save, exit the terminal and then reopen the terminal. conda command should work.