How do I reset and put the zshrc file back to default?
zsh
itself does not have a default user configuration. So the default ~/.zshrc
is actually no ~/.zshrc
.
But as you tagged the question with oh-my-zsh I would assume that you want to restore the default oh-my-zsh configuration. For this it should be sufficient to copy templates/zshrc.zsh-template
from your oh-my-zsh installation path, usually ~/.oh-my-zsh
:
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
You may want to backup your current ~/.zshrc
beforehand. Although it may have some problems now, you still might want to look up some settings once you reverted to default.
There is no such thing as "default". The best you can do, is check if your system has /etc/skel/.zshrc
. If yes copy that into your home.
When you log in first time, your home is populated with everything from /etc/skel
.
My dumass decided to just put a crash command into the zsh file. Now when I open the terminal, it just kernel panics. so I just deleted the config file using rm -f ~/.zshrc* and by default, it just got replaced with another copy. So good luck.