Reputation: 23
I just have installed Catalina on my imac, and I saw a terminal bash looks weird. It should be ~$ but my terminal shows ~% Can anyone change this uncommon line(~%) to a normal line(~$)? Thank you in advance
Upvotes: 1
Views: 2166
Reputation: 39
For a long time, the bash was a default shell in macOS. However, Apple replaced Bourne Again SHell with Z shell for licensing reasons
Set default shell to bash on Macos Catalina. The procedure is as follows:
Upvotes: 3
Reputation: 484
You can set your PS1 variable in your .bashrc, .bash_profile, or .profile to whatever you want. For example:
export PS1=“\h \W $ “
Will give your hostname, current working directory, followed by the $ you wanted. This can be customized however you like, see this link for a good description.
Also, as chepner mentioned in the comments, you need to set your default shell back to bash. I believe the easiest thing to do is go into your terminal settings, and change your shell:
Terminal > Preferences... > General > Shells open with: Command (complete path): /bin/bash
Upvotes: 3