Skip to content

iTerm2 Terminal

Comprehensive iTerm2 shortcuts and workflows for enhanced terminal productivity on macOS.

Basic Navigation

ShortcutDescription
Cmd+TNew Tab
Cmd+WClose Tab
Cmd+Shift+]Next Tab
Cmd+Shift+[Previous Tab
Cmd+1-9Go to Tab 1-9
Cmd+DSplit Pane Vertically
Cmd+Shift+DSplit Pane Horizontally
Cmd+]Next Pane
Cmd+[Previous Pane
Cmd+Option+ArrowNavigate Between Panes
Cmd+Shift+EnterMaximize/Restore Pane

Window Management

ShortcutDescription
Cmd+NNew Window
Cmd+Shift+WClose Window
Cmd+Option+HHide Other Windows
Cmd+MMinimize Window
Cmd+EnterToggle Full Screen
Cmd+Shift+TReopen Last Closed Tab
Cmd+IOpen Window Info

Text Selection and Editing

ShortcutDescription
Double-clickSelect Word
Triple-clickSelect Line
Cmd+ASelect All
Cmd+CCopy
Cmd+VPaste
Cmd+Shift+VPaste Special
Cmd+Option+VPaste Selection
Cmd+FFind
Cmd+GFind Next
Cmd+Shift+GFind Previous
Option+ClickMove Cursor to Click Position

Search and History

ShortcutDescription
Cmd+FOpen Search
Cmd+Option+FOpen Search with Selection
Cmd+RClear Screen
Cmd+KClear Screen and Scrollback
Cmd+Shift+HShow Command History
Cmd+;Show Autocomplete
Cmd+Shift+;Show Command History

Profiles and Preferences

ShortcutDescription
Cmd+,Open Preferences
Cmd+Option+,Open Profile Preferences
Cmd+UUse Transparency
Cmd+Option+BShow Background Image

Advanced Features

ShortcutDescription
Cmd+Shift+ASelect Output of Last Command
Cmd+Option+ASelect All Output
Cmd+Shift+SSave Selection
Cmd+Option+EExpose All Tabs
Cmd+Option+IOpen Quickly
Cmd+Shift+OOpen Quickly with Selection

Marks and Annotations

ShortcutDescription
Cmd+Shift+MSet Mark
Cmd+Shift+JJump to Mark
Cmd+Option+MShow Marks
Cmd+Shift+ASelect to Mark

Hotkey Window

ShortcutDescription
Option+SpaceShow/Hide Hotkey Window (configurable)
Cmd+Option+0Toggle Hotkey Window

Terminal Commands Integration

CommandDescription
imgcat image.pngDisplay image in terminal
it2dl filenameDownload file from remote server
it2ul filenameUpload file to remote server
it2checkCheck iTerm2 integration

Configuration Tips

Profile Setup

bash
# Set up custom profile
# Go to Preferences > Profiles > General
# Configure colors, fonts, and behavior

# Import/Export profiles
# Preferences > Profiles > Other Actions > Import/Export

Shell Integration

bash
# Install shell integration
curl -L https://iterm2.com/shell_integration/install_shell_integration_and_utilities.sh | bash

# Add to ~/.zshrc or ~/.bash_profile
source ~/.iterm2_shell_integration.zsh

Custom Key Bindings

bash
# Configure in Preferences > Profiles > Keys
# Add custom key bindings for frequently used commands
# Example: Cmd+Shift+R for "clear && ls -la"

Productivity Workflows

Multi-Pane Development

bash
# Split terminal for development workflow
# Pane 1: Code editor (vim/nano)
# Pane 2: File watcher/build process
# Pane 3: Git operations
# Pane 4: Server/application logs

Session Management

bash
# Use tmux with iTerm2 for session persistence
tmux new-session -d -s development
tmux split-window -h
tmux split-window -v
tmux attach-session -t development

Quick Commands

bash
# Set up aliases in ~/.zshrc
alias ll="ls -la"
alias gs="git status"
alias gp="git push"
alias gc="git commit -m"
alias ..="cd .."
alias ...="cd ../.."

Best Practices

Performance Optimization

  • Limit scrollback buffer size for better performance
  • Use GPU rendering when available
  • Disable unnecessary visual effects
  • Configure appropriate refresh rates

Security

  • Use secure shell (SSH) with key authentication
  • Configure session timeout for sensitive environments
  • Use separate profiles for different security contexts
  • Enable secure keyboard entry for password input

Customization

  • Create profiles for different development environments
  • Use color schemes that reduce eye strain
  • Configure appropriate font sizes and families
  • Set up custom status bars and badges

Workflow Integration

  • Integrate with version control systems
  • Use shell integration features
  • Configure automatic profile switching
  • Set up custom triggers and alerts