When using the Mac Terminal app, you will notice two (2) different starting command prompts, namely;
- the dollar ($) sign
- the Percent (%) sign
What is the difference between the Percent (%) and Dollar ($) signs?
Both signs have different meanings and usage when used.
Dollar ($) sign command prompt
For macOS Mojave (2018) and earlier, Mac uses the Bash shell and has the dollar ($) sign command prompt.
It means that the Terminal is awaiting commands from the user.
Some examples of bash commands are;
This means navigating to the Desktop folder of your Mac system.
This means performing a listing of all the files in a particular directory. As a result, you will see all the files in a long-list format.
Percent (%) sign command prompt
With macOS Catalina in 2019, Apple uses Zsh as the default login and interactive shell.
Zsh is a command-line interpreter and Unix shell that can be used as a substitution for the Bash shell on many Unix-based systems, including macOS.
Some of the main features of Zsh are;
- Spelling corrections
- Improved tab completion for filenames and options
- Customizable prompt system themes
Why is Mac Terminal using the Percent (%) sign command prompt?
Depending on your situation and your Mac version, there are two (2) reasons why this is so.
- You are using macOS Catalina (2019) & above, and Zsh is the default login and interactive shell.
- You had previously installed Zsh on your Mac computer, and the percent (%) sign is the default command prompt for the Zsh shell.
How can the Percent (%) sign be changed back to the Dollar ($) sign command prompt?
You can open the Mac Terminal and type the command below, to return back to the Bash shell and see the dollar ($) sign as the default command prompt:
chsh -s /bin/bash
Then, exit the Terminal and restart it again to take effect.
You will notice that the Dollar ($) sign command prompt is back now.