Configure Zsh on macOS

What can I say, I’m such a sucker for eye candy I couldn’t resist installing the ZSH shell and the Agnoster theme.

Install ZSH

I use Homebrew to install utilities.

brew install zsh zsh-completions

Set ZSH as default shell

chsh -s $(which zsh)

Install oh-my-zsh

oh-my-zsh is a package manager, the upside being themes support. There are others, but this is older, stable and still popular.

sh -c "$(curl -fsSL"

Configure color scheme for iTerm2

Solarized is nice

Powerline fonts

Patched Powerline fonts are used by many advanced themes and provides useful icons.

Make sure the fonts have been installed correctly. Either you can install them manually or run the script.

Configure fonts for iTerm2

Select the proper, pre-patched fonts marked as Powerline fonts. Make sure you set the fonts for non-ASCII as well.

Solarized Dark theme in iTerm2

This is how the Solarized Dark theme looks like in iTerm2 using above settings and the “agnoster” theme.

If you are on a newer MBP with a touch bar, you can change color themes within iTerm from the touch bar.

Setting oh-my-zsh theme

I’ve chosen the Agnoster theme. It looks great but may be sluggish on large sets. The are many alternatives that look similar, so try them out.

The Powerlevel9 theme is a well known alternative, which is supposedly great for prompt customizations and speed optimized (

Select theme (built-in) by editing the ~/.zshrc file.

Custom theme, such as the powerlevel9k theme, needs to be custom installed.

Intall the custom Powerlevel9k theme

git clone []( ~/.oh-my-zsh/custom/themes/powerlevel9k

Specify the theme in the ~/.zshrc file:


Powerlevel9k in action