Reseting Bash
I cant find to delete ~/Library/Preferences/com.apple.Terminal.plist to reset my bash on BigSur.
Can you please guide me?
In essence,
I want to reset my shell startup configuration on BigSur.
I cant find to delete ~/Library/Preferences/com.apple.Terminal.plist to reset my bash on BigSur.
Can you please guide me?
In essence,
I want to reset my shell startup configuration on BigSur.
The Zsh shell does not use Bash dot files (e.g. ~/.bashrc, ~/.bash_profile, etc.). Zsh uses its own dot file (~/.zshrc) located in your home directory, and it does not exist by default, so you have to create it with a text editor.
At minimum, it might look like the following:
export PATH=".:$HOME:$PATH"
# if using any added tools in /usr/local/bin whose name may conflict with any in $PATH
# export PATH=".:$HOME:/usr/local/bin:$PATH"
PS1="%m: %~ %% "
# for command-line editing using vi/vim syntax
bindkey -v
Once you have saved this file in your home directory as .zshrc, you can invoke those exports to the current Zsh shell as:
source ~/.zshrc
and subsequently, everytime you open a new Terminal window, Zsh will process the contents of that file.
erenaktas wrote:
I am not trying to change shells.
I am trying to reset my environment variables such as PATH in my startup configuration permanently.
https://askubuntu.com/questions/476246/when-i-use-zsh-how-do-i-set-path-in-etc-profile-d
https://medium.com/@youngstone89/setting-up-environment-variables-in-mac-os-28e5941c771c
https://stackoverflow.com/questions/22465332/setting-path-environment-variable-in-osx-permanently
@leroydouglas
Thanks for these. However, I had tried them on .bash_profile but it only works temporarily. When I restart the shell, the variables that should have unset are coming back on my environment on my zsh.
I am not trying to change shells.
I am trying to reset my environment variables such as PATH in my startup configuration permanently.
@VikingOSX Thank you for this clear recommendation. It reflected now smoothly on my machine by creating .zhsrc file.
You are welcome.
erenaktas wrote:
I cant find to delete ~/Library/Preferences/com.apple.Terminal.plist to reset my bash on BigSur.
Can you please guide me?
In essence,
I want to reset my shell startup configuration on BigSur.
To see you current shell:
echo $SHELL
To see your options:
cat /etc/shells
To change shells, for ex. bash:
chsh -s /bin/bash
To change shells, for ex. zsh:
chsh -s /bin/zsh
Reseting Bash