iTerm2 and Alternative Terminals
While Terminal.app is capable, many power users prefer third-party terminal emulators. iTerm2 is the most popular choice, offering features like split panes, extensive customization, and powerful automation. This chapter covers iTerm2 in depth and surveys alternatives.
iTerm2
iTerm2 is a free, open-source terminal emulator for macOS with an active community and extensive feature set.
Installation
# Via Homebrew (recommended)
$ brew install --cask iterm2
# Or download from: https://iterm2.com
Key Features
Split Panes
Create multiple panes in a single tab:
| Action | Shortcut |
|---|---|
| Split vertically | Cmd+D |
| Split horizontally | Cmd+Shift+D |
| Navigate panes | Cmd+Option+Arrow |
| Maximize pane | Cmd+Shift+Enter |
| Close pane | Cmd+W |
Hotkey Window
A terminal that slides down from the top (like Quake consoles):
- Preferences → Keys → Hotkey
- Create a Dedicated Hotkey Window
- Assign a hotkey (e.g.,
Option+Space) - Configure to show/hide with hotkey
Search with Regex
Cmd+F opens find bar with regex support:
# Search for IP addresses
\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}
# Search for email-like patterns
\S+@\S+\.\S+
Shell Integration
iTerm2’s shell integration provides:
- Current directory in tab title
- Command history with timestamps
- Marks at prompts
- Captured command output
- Alerts on long command completion
- File download from remote servers
Install:
# Automatic installation
$ curl -L https://iterm2.com/shell_integration/install_shell_integration.sh | bash
# Or install for specific shell
$ curl -L https://iterm2.com/shell_integration/zsh -o ~/.iterm2_shell_integration.zsh
$ echo 'source ~/.iterm2_shell_integration.zsh' >> ~/.zshrc
After installation, right-click to:
- Select output of last command
- Download files from remote hosts
- Open Recent Directories
Triggers
Automatically perform actions when text matches patterns:
- Preferences → Profiles → Advanced → Triggers
- Add regex patterns
- Choose actions: highlight, alert, run command, etc.
Examples:
- Highlight errors in red
- Alert on build completion
- Run command when pattern matches
Instant Replay
Scroll back through terminal history with time-based replay:
- Press
Cmd+Option+B - Use arrow keys to move through history
- Press Escape to return to live view
Password Manager
Store frequently-used passwords:
- Preferences → Profiles → Advanced → Triggers
- Or: Window → Password Manager (
Cmd+Option+F) - Store username/password pairs
- Click to paste (use with Secure Keyboard Entry)
Image Display
iTerm2 can display images inline:
# Using imgcat (part of shell integration)
$ imgcat image.png
# For remote servers, install imgcat:
$ curl -L https://iterm2.com/utilities/imgcat -o ~/bin/imgcat
$ chmod +x ~/bin/imgcat
Broadcast Input
Type in multiple panes simultaneously:
- Shell → Broadcast Input
- Options: To All Panes, To All Tabs, etc.
- Type once, appears everywhere
Useful for running the same command on multiple servers.
Profiles
Create different profiles for different contexts:
- Development (large font, dark theme)
- SSH (different colors per server)
- Presentation (huge font, high contrast)
Switch with Cmd+O (profile picker).
Configuration
Appearance
Preferences → Appearance:
- Theme: Dark, Light, Minimal, etc.
- Tab position: Top, Left, Bottom
- Status bar: Enable/configure
Keys
Preferences → Keys → Key Bindings:
- Global hotkey
- Custom key mappings
- Presets: Natural Text Editing (makes Option+Arrow work like other apps)
Natural Text Editing Preset:
- Preferences → Profiles → Keys
- Key Mappings → Presets → Natural Text Editing
This enables:
Option+Left/Right- Move by wordOption+Backspace- Delete wordCmd+Left/Right- Move to line start/end
Status Bar
Preferences → Profiles → Session → Status bar:
Components:
- Current directory
- Git branch
- CPU/Memory usage
- Battery
- Custom text
Scripting
iTerm2 supports Python scripting:
#!/usr/bin/env python3
# Requires: pip install iterm2
import iterm2
async def main(connection):
app = await iterm2.async_get_app(connection)
window = app.current_terminal_window
if window:
await window.current_tab.current_session.async_send_text('echo Hello\n')
iterm2.run_until_complete(main)
Recommended Settings
For productivity:
- Enable hotkey window (
Option+Space) - Install shell integration
- Enable Natural Text Editing
- Configure triggers for errors/completions
- Set up profiles for different contexts
Alternative Terminal Emulators
Alacritty
GPU-accelerated, fast, cross-platform terminal:
$ brew install --cask alacritty
Characteristics:
- Very fast (GPU rendering)
- Configuration via TOML file
- No tabs (use tmux)
- Cross-platform (macOS, Linux, Windows)
- Minimal features by design
Configuration (~/.config/alacritty/alacritty.toml):
[font]
normal = { family = "SF Mono", style = "Regular" }
size = 13.0
[colors.primary]
background = "#1d1f21"
foreground = "#c5c8c6"
[window]
dimensions = { columns = 120, lines = 35 }
padding = { x = 5, y = 5 }
Best for: Users who want speed and use tmux for session management.
Kitty
Feature-rich, GPU-accelerated terminal:
$ brew install --cask kitty
Characteristics:
- GPU rendering (fast)
- Native tabs and splits
- Image display
- Ligature support
- Remote file access
- Extensive customization
Configuration (~/.config/kitty/kitty.conf):
font_family SF Mono
font_size 13.0
background #1a1a1a
foreground #d8d8d8
enable_audio_bell no
Best for: Users wanting features without sacrificing performance.
Warp
Modern terminal with AI features:
$ brew install --cask warp
Characteristics:
- Block-based command interface
- AI command suggestions
- Modern IDE-like editing
- Shared workflows
- Requires account (free tier available)
Best for: Users who want a modern take on terminals with AI assistance.
Hyper
Web-technology-based terminal:
$ brew install --cask hyper
Characteristics:
- Built on Electron (HTML/CSS/JS)
- Highly themeable
- Plugin ecosystem
- Cross-platform
- Higher memory usage than native apps
Configuration (~/.hyper.js):
module.exports = {
config: {
fontSize: 13,
fontFamily: '"SF Mono", monospace',
cursorShape: 'BLOCK',
shell: '/bin/zsh',
},
plugins: ['hyper-dracula'],
};
Best for: Web developers who want to customize with JS/CSS.
WezTerm
GPU-accelerated, cross-platform, Lua-configured:
$ brew install --cask wezterm
Characteristics:
- GPU rendering
- Lua configuration
- Multiplexing built-in
- Cross-platform
- Active development
Configuration (~/.wezterm.lua):
local wezterm = require 'wezterm'
return {
font = wezterm.font 'SF Mono',
font_size = 13.0,
color_scheme = 'Catppuccin Mocha',
enable_tab_bar = true,
}
Best for: Users who want customization with a real programming language.
Feature Comparison
| Feature | Terminal.app | iTerm2 | Alacritty | Kitty | Warp |
|---|---|---|---|---|---|
| Split panes | No | Yes | No | Yes | Yes |
| GPU rendering | No | Optional | Yes | Yes | Yes |
| Tabs | Yes | Yes | No | Yes | Yes |
| Shell integration | Basic | Advanced | No | Yes | Advanced |
| Profiles | Yes | Yes | No | Yes | Yes |
| Images inline | No | Yes | Yes | Yes | Yes |
| Hotkey window | No | Yes | No | No | No |
| Cross-platform | No | No | Yes | Yes | No |
| Configuration | GUI | GUI | TOML | conf | GUI |
| Price | Free | Free | Free | Free | Freemium |
tmux: Terminal Multiplexer
Regardless of which terminal you choose, tmux provides powerful session management:
$ brew install tmux
tmux provides:
- Sessions that persist after disconnection
- Split panes (works in any terminal)
- Multiple windows
- Session sharing
- Scriptable
Basic tmux usage:
# Start new session
$ tmux new -s work
# Detach
Ctrl+b, d
# List sessions
$ tmux ls
# Reattach
$ tmux attach -t work
# Split panes
Ctrl+b, % # Vertical
Ctrl+b, " # Horizontal
# Navigate panes
Ctrl+b, arrow
Recommendation: If you use Alacritty, tmux is essential. For iTerm2 or Kitty users, tmux is optional but useful for remote work.
Choosing a Terminal
Use Terminal.app if:
- You want no additional software
- You’re working on shared/managed Macs
- Your needs are basic
Use iTerm2 if:
- You want split panes and hotkey window
- You need advanced features (triggers, shell integration)
- You prefer GUI configuration
- You’re a power user
Use Alacritty/Kitty if:
- You want maximum performance
- You prefer config-file configuration
- You use tmux
- You work cross-platform
Use Warp if:
- You want AI assistance
- You prefer modern IDE-like interfaces
- You’re comfortable with an account requirement
Summary
The terminal emulator choice is personal, but common paths:
- Start with Terminal.app - Learn the basics
- Graduate to iTerm2 - Most macOS power users land here
- Consider alternatives - If you have specific needs (speed, cross-platform, etc.)
iTerm2’s combination of features, stability, and active development makes it the default recommendation for macOS power users. But any terminal that supports UTF-8 and 256 colors will work well for most tasks—the choice is about workflow optimization, not capability.