Ultimate ZSH Customize Tutorial🚀

April 1, 2019 • Read: 4667 • Note

Requirements: iTerm2

This Ultimate Tutorial aims to show you the most beautiful terminal installation steps.

1. Install Oh my zsh

# curl installation
$ sh -c "$(curl -fsSL"
# wget installation
$ sh -c "$(wget -O -)"

Note: change system default terminal for Mac

zsh is another bash, configure file located at ~/.zshrc

# using zsh
chsh -s /bin/zsh
# using dash
chsh -s /bin/bash

After installation your terminal will look like this:


2. Install PowerLine

如果是身处我大中国,那么豆瓣镜像源(或者 其他 你喜欢的)讲你是 pip 的无敌buff😆

$ vi ~/.pip/pip.conf

如果没有上述 conf 文件那就 touch 一个吧,然后添加以下配置来给 pip 加速:

index-url =
trusted-host =

Now install powerline

# if you do not install pip
# $ sudo easy_install pip
$ pip install powerline-status --user

3. Install PowerFonts

PowerFonts is a special font for customizing zsh

$ git clone --depth=1
$ cd fonts
$ ./

Then you should set the font for iTerm2 in Preferences(press + ,)

set font for powerline

4. Add Color Schemes

You can choose one of your favorite color scheme for the terminal here (Download it first).

Since I am using Atom for my text editor, I'd love Atom theme. Click Color Presets... > Import..., select one you like in iTerm2-Color-Schemes/schemes/**.itermcolors and click Color Presets... again to select it.

import color scheme

5. Install agnoster theme

$ git clone
$ cd oh-my-zsh-agnoster-fcamblor/
$ ./install

And then you may configure it to add this theme.

$ vi ~/.zshrc

Modify the theme after ZSH_THEME to agnoster at 11th line:

modify theme

+ Q to quit your iterm and reopen it. You will see the amazing view.

theme set done

6. Install highlight plugin

$ cd ~/.oh-my-zsh/custom/plugins/
$ git clone
$ vi ~/.zshrc

Add zsh-syntax-highlighting to plugins(Make sure highlight plugin is the last one):

highlight plugin

This syntax will highlight the command you input to green if it is correct, otherwise red.

highlight plugin show

7. Install AutoSuggestion Plugin

$ cd ~/.oh-my-zsh/custom/plugins/
$ git clone
$ vi ~/.zshrc

Add zsh-autosuggestions to plugins next to git(Do not append it at the last line). Here is its functions:

auto suggestion plugin

8. Install powerlevel9k

Option1: Homebrew

$ brew tap sambadevi/powerlevel9k
$ brew install powerlevel9k

Option2: Git

$ git clone ~/.oh-my-zsh/custom/themes/powerlevel9k

Then set ZSH_THEME="powerlevel9k/powerlevel9k"in ~/.zshrc

You can see more info on wiki page. And there are lots of config templet here.

9. Install Hack Nerd Font

$ brew tap homebrew/cask-fonts
$ brew cask install font-hack-nerd-font


Last Modified: September 20, 2019
Archives Tip
QR Code for this page
Tipping QR Code
Leave a Comment

  1. Apollo Apollo