I recently reinstalled my macOS and spent some time reconfiguring the shell environment. Admittedly, the default macOS Terminal looks outdated and lacks some important productivity features.
Prerequisites
Homebrew
Homebrew is a popular package manager for macOS, specifically for the terminal environment. The App Store may suffice for regular users, but Homebrew is a must-have for people doing engineering work on macOS.
Install Homebrew:
| |
Zsh
Zsh (Z shell) has replaced Bash as the default shell since macOS Catalina.
macOS includes zsh by default, but you can update it via Homebrew:
| |
iTerm2 Terminal
According to iTerm2:
iTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with macOS 10.14 or newer. iTerm2 brings the terminal into the modern age with features you never knew you always wanted.
It brings many convenient modern features. Some of my favorites are:
- Split panes
- Hotkey window
- 24-bit color and 256 color mode
- Global search
- Password manager
Install iTerm2 with Homebrew:
| |
Oh-My-Zsh
According to the Oh My Zsh site:
Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, themes, and a few things that make you shout…
Install with curl:
| |
Install with wget:
| |
Zsh itself is a framework and allows you to configure and customize your shell environment, particularly with themes for appearance and plugins for functionality.
Personally, I use the Pure theme and a few plugins I find useful:
- git (included with oh-my-zsh)
- zsh-autosuggestions — provides command suggestions as you type, based on your history.
- zsh-syntax-highlighting — highlights commands as you type, making it easier to spot errors.
- web-search — facilitates quick web searches directly from your terminal.
