- Download iTerm2 from iTerm2 Official Website.
- Optionally, set it as the default terminal: Preferences → General → "Make iTerm2 Default Term".
- Zsh is pre-installed on macOS. To upgrade:
brew install zsh
- Verify installation:
zsh --version
- Set Zsh as the default shell:
chsh -s $(which zsh)
- Restart iTerm2.
- Run the following command:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- Open the configuration file:
nano ~/.zshrc
- Add plugins:
plugins=(git z zsh-autosuggestions zsh-syntax-highlighting)
- zsh-autosuggestions:
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
- zsh-syntax-highlighting:
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
- Clone the theme:
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
- Set the theme:
ZSH_THEME="powerlevel10k/powerlevel10k"
- Reload Zsh:
source ~/.zshrc
- Configure the theme:
p10k configure
- Download a Nerd Font from Nerd Fonts. Recommended: Hack Nerd Font or MesloLGS NF.
- Install the font by opening the
.ttf
file. - Set the font in iTerm2: Preferences → Profiles → Text → Change Font → Select the Nerd Font.
source ~/.zshrc