A better terminal on MacOS with Zsh and OhMyZsh

Let’s face it, the default terminal you get from macOS is terrible. So I’m writing this little article to show how to improve it with iTerm2, zsh, and some themes.

Installing a better terminal and shell

First, go get iTerm2.

Now, open that bad boy up and make sure it runs any updates. Now you need to install homebrew if you don’t already have it.

Bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install zsh and zsh-completions

Bash
brew install zsh zsh-completions

and omyzsh

Bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

and Bam! You know have a better shell. But what if i want to make it even better!? This is where themes come in.

Install a theme (Powerlevel 9k)

Powerlevel 9k is a theme for ohmyzsh that really adds some bang to your shell install. It’s a little slow, so if you want something more lightweight then you can try Powerlevel 10k.

Step 1) Install the theme

Bash
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k

edit your ~/.zshrc file with the following:

Zsh
ZSH_THEME="powerlevel9k/powerlevel9k"

Step 2) Install fonts

Bash
brew install python
sudo easy_install pip
pip install --user powerline-status

Step 3) Tell iTerm2 to use the font

In iTerm2 go to the preferences and select Profiles and select Text

In the fonts section, select a desired powerline font. I chose Fira Mono for Powerline and tend to pull the font size up to 14.

Leave a Reply

I’m David

Welcome to my little corner of the internet that I dedicate to programming. I’m a principal software engineer at Fynix Consulting and strive to always be learning new things. I love to code and I love to write about coding!

Let’s connect

Discover more from David Boothe's Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading