A query about the terminal

In my terminal I typed in zsh --version in order to check which version of zsh I have for my terminal and it told me zsh 5.7.1.

I also checked for bash, I seem to have that too as GNU bash, version 3.2.57(1)-release.

Why do I have both zsh and bash pre-installed? (It’s a new macbook.)

Also wondering why the terminal command lines show a % sign instead of a $ sign?

Many thanks.

bash is standard, it’ll always be installed, it has to be there tbh. [I think] zsh is now default on new Mac’s It’s just a slightly different shell, has better ergonomics. They work basically the same. Some people want bash, some people want zsh (or install fish or whatever). Same as how you’ll have at least three text editors preinstalled (vim, emacs, nano) (EDIT four, there’s Pico as well).

It’ll be set to be %, can be anything you want (like mine is set to be dir (the git branch I'm on) > ). Can’t remember which setting it is in your .zshrc/.bash_profile/whatever, you’d need to Google, but you can customise anything basically.

1 Like

Thank you for explaining.