When using Terminal under a recent macOS version, you’ll most likely will be using Z-Shell (zsh) – a quite common Shell found under Linux as well.
This used to be Bash, but Apple moved to Z-Shell early 2019 (some users may see a message when opening Terminal, requesting them to migrate to zsh).
I do tinker in Terminal quite often and always found the prompt kind-a boring.
In this article: how to customize the Z-Shell prompt.
Note: most of these tricks/settings may work the same way for different shells as well, like Bash and even Linux shell variants.
Ad Blocking Detected Please consider disabling your ad blocker for our website.
We rely on these ads to be able to run our website.
You can of course support us in other ways (see Support Us on the left).
For those who need a cheat sheet on XTerm colors, here a quick and short reference overview.
These colors should work for anything that supports the XTerm color-scheme, so this includes several Terminal emulators and several Shell variants like Z-Shell.
I needed this while customizing my Z-Shell prompt, and I hope this is useful to others as well as a reference sheet.
I’ve split it up in the 16 basic colors, 24 greyscale “colors”, and 256 colors.