I was trying new dev environments including zsh and oh-my-zsh. Now that I have installed oh-my-zsh, it starts by default on my terminals (iTerm2 and terminal) always start with zsh and with the settings on from oh-my-zsh. I was wondering if it was possible to "disable" or stop using zsh and its setup with oh-my-zsh without having to uninstall oh-my-zsh? It would also be nice to know how to turn them back on too.
Currently, my terminals goes into zsh automatically (I think) and use the oh-my-zsh automatically. I want to have more control over that and me able to control both, when the zsh is being used and when the oh-my-zsh features are being used.
One thing I am also interested on knowing is, how do the terminal applications know which shell to start running on start up. That would be nice to be able to control too!
If you explain as much as you can of the "why" of every command you give me, that would useful! 🙂
I am on OS X. Not sure if that matters, but I tend to like answers more that are more applicable to more general Unix environments rather to my own.
Best Answer
The wording of your question is ambiguous, so I can't tell if you mean you want to stop using
zsh
or you want to stop usingoh-my-zsh
. I will cover both.Disabling
zsh
Simply run
chsh
and select whatever shell you were using before. If you don't know what shell you were using before, it is almost certainlybash
. This command changes the "login shell" that is associated with your user. Essentially, it changes your default shell.You will need to open a new terminal window for changes to take effect. If this does not work, you will need to log out and log back in again to reinitialize your environment.
Disabling only
oh-my-zsh
~/.zshrc.pre-oh-my-zsh
exists. It probably does. (This file will have been created when theoh-my-zsh
installation script moved your previous.zshrc
out of the way..zshrc
is a startup file ofzsh
, similar to.bashrc
forbash
.)mv ~/.zshrc ~/.zshrc.oh-my-zsh
. This will put theoh-my-zsh
-created.zshrc
out of the way, so we can restore the original, by doingmv ~/.zshrc.pre-oh-my-zsh ~/.zshrc
.~/.zshrc
in a text editor. Find the line that sayssource $ZSH/.oh-my-zsh
and either comment it out or remove it. This will disable the initialization ofoh-my-zsh
.You will need to restart your shell for changes to take effect.