October 7, 2024
•Last updated October 20, 2026
How to Make Your Mac Terminal Beautiful with iTerm2 and Zsh
A good terminal setup should be easy to read, show useful information, and stay out of your way. A clear font, a color scheme you like, and a prompt that shows your current Git branch can make a noticeable difference without adding a pile of plugins.
In this guide, we'll customize a Mac terminal with iTerm2, Oh My Zsh, and the Spaceship prompt. We'll also add command suggestions and syntax highlighting, with Homebrew paths that account for Apple Silicon and older Intel installations.
Watch the original video walkthrough. The video shows the original 2024 setup. Follow the written instructions below for the updated installation steps.
What we're changing
A terminal theme can mean a few different things:
- iTerm2 is the terminal application. It controls the window, fonts, and colors.
- Zsh is the shell that reads and runs your commands.
- Oh My Zsh helps organize your Zsh configuration, themes, and plugins.
- Spaceship builds the prompt, including information such as your directory and Git status.
- An iTerm2 color preset changes the palette used to display terminal output.
Changing an iTerm2 color preset won't install a shell theme. Changing your Zsh theme won't select a font. We'll handle those pieces separately.
You can also stop after changing your font and colors if that's all you need.
Before you begin
This walkthrough uses macOS's built-in Zsh and the Oh My Zsh installation method for Spaceship. Node.js and npm are not required.
Open your current terminal and check the essentials:
/bin/zsh --version
git --version
Spaceship requires Zsh 5.2 or newer. If macOS asks you to install Apple's Command Line Tools when checking Git, complete that step before continuing.
Back up your existing shell configuration:
if [ -f "$HOME/.zshrc" ]; then
cp "$HOME/.zshrc" "$HOME/.zshrc.backup.$(date +%Y%m%d-%H%M%S)"
fi
Keep an existing terminal window open while you make changes. It's useful to have a working shell available if you need to fix a typo.
The installation commands below download third-party software. Read the linked project instructions and inspect installer scripts before running them. Don't paste a command into your terminal just because a tutorial includes it.
Step 1: Install iTerm2
Download a stable build from the official iTerm2 download page. Choose a release compatible with your macOS version, then move the application into your Applications folder and open it.
You can keep Apple's Terminal installed. iTerm2 is another application, not a replacement for macOS's shell.
In iTerm2, open Settings → Profiles and select the profile you want to customize. Older releases call this window Preferences. Make sure you're editing the profile used by your new terminal windows.
Step 2: Check Zsh and Homebrew
Use the Zsh that comes with macOS
Zsh is the default shell on current macOS releases. You don't need to install another copy through Homebrew for this setup.
Check your configured login shell and the shell running in this window:
printf 'Login shell: %s\n' "$SHELL"
printf 'Current Zsh version: %s\n' "${ZSH_VERSION:-not running Zsh}"
If you aren't using Zsh and want to make Apple's copy your login shell, run:
chsh -s /bin/zsh
Open a new terminal window afterward. If it still launches a different shell, check the command configured in your terminal profile. A profile can override your login shell.
Check Homebrew before installing it
We'll use Homebrew for the optional font and plugins:
command -v brew
If that prints a path, continue with your existing installation. If it doesn't, use the instructions on the official Homebrew site and review its installation requirements. Follow the installer's “Next steps” so new shells can find brew.
Homebrew's normal prefix is /opt/homebrew on Apple Silicon. Legacy Intel macOS installations use /usr/local. However, correct paths don't guarantee platform support: Homebrew currently classifies Intel macOS as Tier 3. Check the current support tiers before installing or troubleshooting it on an older Mac.
For an existing default installation that isn't on your path, the appropriate line in ~/.zprofile is:
# Apple Silicon: use this line if Homebrew is installed here.
eval "$(/opt/homebrew/bin/brew shellenv)"
Or, for a legacy Intel installation:
# Intel: use this line if Homebrew is installed here.
eval "$(/usr/local/bin/brew shellenv)"
Use the line that matches your installation, not both. Don't add another copy if the installer already added it. Open a new login-shell window, then check:
brew --prefix
If you're using Apple's Terminal or iTerm2 with a custom non-login shell command, review that profile rather than moving configuration between startup files at random.
Step 3: Install Oh My Zsh
Skip this installation if you already use Oh My Zsh. Preserve the customizations in your existing ~/.zshrc as you work through the remaining steps.
For a new installation, download the installer from the project's own repository to a temporary file:
omz_installer="$(mktemp -t oh-my-zsh-install)"
curl -fsSL \
https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh \
-o "$omz_installer"
less "$omz_installer"
Press q to leave less. If the download failed, stop rather than continuing. Read the script and the Oh My Zsh installation instructions. When you're comfortable with what it changes, run the downloaded file in that same terminal session:
sh "$omz_installer"
This separates downloading from execution instead of running an unseen script immediately. It doesn't make third-party code automatically safe.
The installer creates an Oh My Zsh configuration and normally saves an existing .zshrc as .zshrc.pre-oh-my-zsh. Review that file and bring back any aliases, language-manager settings, or other configuration you need. Don't blindly copy the entire old file over the new one.
Step 4: Install Spaceship as an Oh My Zsh theme
We'll use Spaceship's documented Oh My Zsh method. Don't combine this with a separate npm or Homebrew installation of the same prompt.
Open a new Zsh window after installing Oh My Zsh, then run:
zsh_custom_dir="${ZSH_CUSTOM:-${ZSH:-$HOME/.oh-my-zsh}/custom}"
mkdir -p "$zsh_custom_dir/themes"
git clone --depth=1 \
https://github.com/spaceship-prompt/spaceship-prompt.git \
"$zsh_custom_dir/themes/spaceship-prompt"
ln -s \
"$zsh_custom_dir/themes/spaceship-prompt/spaceship.zsh-theme" \
"$zsh_custom_dir/themes/spaceship.zsh-theme"
If the directory or link already exists, inspect it rather than deleting it or forcing an overwrite. You may already have Spaceship installed.
Open your shell configuration:
nano ~/.zshrc
Find the existing ZSH_THEME assignment and change it to:
ZSH_THEME="spaceship"
Keep that assignment above the line that loads Oh My Zsh:
source "$ZSH/oh-my-zsh.sh"
Edit those existing lines; don't add a second Oh My Zsh loader. Save the file, then open a new terminal window. You should see the Spaceship prompt.
To customize the prompt later, use ~/.spaceshiprc.zsh. For example:
SPACESHIP_TIME_SHOW=true
Spaceship reads that configuration file when it starts. Its configuration guide covers the available options.
Step 5: Choose a font and color scheme
Install a font with the symbols your prompt needs
Missing icons often point to a font problem rather than a broken prompt. Choose a Powerline-compatible or Nerd Font, such as the patched FiraCode Nerd Font.
If Homebrew is available on your Mac:
brew install --cask font-fira-code-nerd-font
That is the patched font package, not just the ordinary Fira Code family. You can alternatively download a font from Nerd Fonts and install it with Font Book.
In iTerm2, go to Settings → Profiles → Text and choose FiraCode Nerd Font Mono, or another installed monospaced Nerd Font. Installing a font doesn't automatically select it for your terminal profile.
Start with a comfortable size and check a few commands before adjusting ligatures or spacing. Readability matters more than fitting an extra line on the screen.
Import an iTerm2 color preset
Browse the iTerm2 Color Schemes gallery and download the .itermcolors file for a theme you like.
In iTerm2:
- Open Settings → Profiles → Colors.
- Open Color Presets and choose Import.
- Select the downloaded
.itermcolorsfile. - Open Color Presets again and select the imported preset.
The iTerm2 color documentation explains how presets work. Download a color file, not a GitHub HTML page saved with a different extension.
Check the normal text, selected text, error output, and dimmed suggestions against the background. A theme that looks great in a screenshot can still be hard to read in daily use.
Transparency, blur, and background images are optional. Keep the contrast high enough to read your terminal over whatever is behind it.
Step 6: Add suggestions and syntax highlighting
Two useful additions are:
- zsh-autosuggestions, which can suggest commands from your history as you type.
- zsh-syntax-highlighting, which colors the command line as you edit it.
Install them through Homebrew:
brew install zsh-autosuggestions zsh-syntax-highlighting
Then add this block to the end of ~/.zshrc, after Oh My Zsh and other plugins:
if command -v brew >/dev/null 2>&1; then
brew_prefix="$(brew --prefix)"
if [[ -r "$brew_prefix/share/zsh-autosuggestions/zsh-autosuggestions.zsh" ]]; then
source "$brew_prefix/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
fi
# Keep syntax highlighting after other plugins and widget configuration.
if [[ -r "$brew_prefix/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]]; then
source "$brew_prefix/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
fi
unset brew_prefix
fi
Using brew --prefix avoids hard-coding an Intel-only path. The readability checks also prevent missing-file errors if you later remove either plugin.
This setup loads the Homebrew copies directly. Don't also add these same plugins to Oh My Zsh's plugins=(...) list unless you've deliberately switched to a different installation method. Loading the same plugin twice makes troubleshooting harder.
For reference, Homebrew documents the activation paths for autosuggestions and syntax highlighting. The highlighting project's installation notes explain why load order matters.
Check your setup
Before opening another shell, check your configuration for syntax errors:
/bin/zsh -n ~/.zshrc
No output usually means it parsed successfully. This is a syntax check, not a test that every plugin or external command exists.
Open a new terminal window and try the following:
- Run
pwdand confirm the prompt and output are readable. - Enter a Git repository and check that the branch appears.
- Type the beginning of a command you've used before and look for a suggestion. With the usual key bindings, Right Arrow at the end of the line accepts it.
- Type a command name, then edit it, and watch the syntax colors change.
- Open another new window to confirm the configuration persists.
Troubleshooting
brew: command not found
Homebrew may be installed but missing from this shell's path. Check the installer's “Next steps,” your ~/.zprofile, and your terminal's login-shell setting. Don't install a second copy just to fix a path issue.
theme 'spaceship' not found
Check that the theme link exists and points at a real file:
zsh_custom_dir="${ZSH_CUSTOM:-${ZSH:-$HOME/.oh-my-zsh}/custom}"
ls -l "$zsh_custom_dir/themes/spaceship.zsh-theme"
Also confirm that ZSH_THEME="spaceship" appears before Oh My Zsh loads. Installing an npm package alone doesn't create the Oh My Zsh theme link used in this tutorial.
Icons appear as squares or question marks
Select the patched font in the active iTerm2 profile, then open a new window. If you've enabled a separate non-ASCII font, check that setting too. iTerm2's text settings describe how font selection applies.
Suggestions or highlighting don't appear
Check brew --prefix and confirm the plugin files exist below that directory. Check the end of .zshrc for the loader block. Syntax highlighting should load after other plugins and command-line widget setup.
If suggestions are present but barely visible, adjust their contrast against your chosen theme.
A new terminal window prints errors
Use the working window you kept open to fix .zshrc. You can also start Zsh without the usual user startup configuration:
/bin/zsh -f
Comment out the most recent change, check the file with zsh -n, and try another window. Your timestamped backup is there if you need to compare the previous configuration.
The terminal feels slower
Temporarily disable optional plugins or prompt sections one at a time. A prompt with lots of repository checks and integrations can do more work than you need.
Keep it useful
Start with one readable font, one color scheme, and a prompt that shows information you actually use. Add plugins when they solve a specific annoyance. You can always tinker with the rest later.
Categories
Products and courses
-
Hello Hotwire
A course on Hotwire + Ruby on Rails.
-
Hello Rails
A course for newcomers to Ruby on Rails.
-
Rails UI
UI templates and components for Rails.