My minimalist shell setup — Bash in Terminal and Zsh in iTerm2

Jamie Wen
3 min readApr 25, 2022

Update: March 2023. I move to https://alacritty.org as my primary terminal simulator.

The key is having 2 pairs of separate shell environments running independently — the fancy Zsh/iTerm2 setup as my primary shell environment, and Bash/Terminal as a stable fallback environment

2 pairs of separate shell environments

The Terminal Application

Popular terminal applications on MacOS are:

  • Terminal (MacOS built in)
  • iTerm2 (most popular and my goto, written in Objective-C )
  • Hyper (yet another popular one, an Electron-based terminal)

I personally prefer to download iTerm2 from their office website, unzip it and move the app file to the Application folder. For critical applications like iTerm2, I wanted to keep them without any extra dependencies like package manager or whatnot, so that I could have a stable and seamless user experience.

The Shell

https://developer.ibm.com/tutorials/l-linux-shells/

Keep Bash as the default shell for Terminal

Keep the default setup as your plan B. If you happen to change it to one of the fancy shells (zsh, fish), I’d suggest switching back to bash to maximize the benefits of compatibility, stability, and availability.

Change it via the command line 👇

# use bash as default - recommended chsh -s /bin/bash# use zsh as default - still popular but I am not a fun of thischsh -s /bin/zsh

Or, change it via the UI 👇

System Preferences > Users & Groups >Unlock > Right click current user and choose “Advanced Options” > input Login shell > choose /bin/bash

Change user’s login shell via UI

Use Zsh in iTerm2 for fancy functionality

  1. Install Homebrew 👉 https://brew.sh/
  2. Install Zsh brew install zsh & zsh --version
  3. Install On My Zsh: https://ohmyz.sh/
  4. Use Zsh in iTerm2, Preferences > Profiles > General Tab > Command > Choose “Custom Shell” > input /bin/zsh
use zsh as iTerm2 default shell

The Theme

  1. Install my favourite Nerd Fonts — Hack
brew tap homebrew/cask-fontsbrew install --cask font-hack-nerd-font

2. Change the font in iTerm2

Choose Hack Nerd Font in iTerm2

3. Change the Color Presets in iTerm2

The Plugins

  1. oh my zsh: https://github.com/ohmyzsh/ohmyzsh
  2. zsh auto suggestion: https://github.com/zsh-users/zsh-autosuggestions
  3. zsh auto highlight: https://github.com/zsh-users/zsh-syntax-highlighting

The Prompt

I have a customised prompt for zsh, check it out 👉 My minimalist prompt setup on zsh + oh-my-zsh

I also tried Starship for a couple of weeks, but I eventually stay with my minimalist prompt setup 👆

To Recap

  • Have two separate shell environments — one for stability, one for usability
  • Zsh in iTerm2 as the primary shell environment
  • Bash in Terminal as the secondary shell environment

--

--