Homebrew Path Differences
On Apple Silicon (M1/M2/M3/M4), Homebrew installs binaries to /opt/homebrew/bin (unlike /usr/local/bin on older Intel Macs). Ensure your ~/.zprofile initializes Homebrew: eval "$(/opt/homebrew/bin/brew shellenv)".
macOS is the primary development platform for many tmux power users. tmux runs natively on macOS via Homebrew or MacPorts, and can also be compiled from the latest source. Choose your method below.
Homebrew is the most widely used macOS package manager. It gives you the latest stable tmux binary in seconds.
If you don't have Homebrew yet, install it first:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Run the Homebrew install command to fetch the latest stable release:
$ brew install tmux
Confirm tmux is installed correctly:
$ tmux -V
tmux 3.6a
For users in the MacPorts ecosystem, tmux is available in the ports tree.
$ sudo port install tmux
$ tmux -V
Build the absolute latest version from the official GitHub repository. Requires Xcode Command Line Tools.
$ xcode-select --install
tmux requires libevent and ncurses:
$ brew install automake pkg-config libevent ncurses
$ git clone https://github.com/tmux/tmux.git
$ cd tmux
$ sh autogen.sh
$ ./configure && make
$ sudo make install
$ tmux -V
Tips to get the best tmux experience on macOS, including clipboard, terminal integration, and daemon persistence.
macOS uses pbcopy and pbpaste for clipboard access. Add this to ~/.tmux.conf to enable copy-mode clipboard support with vi keybindings:
# macOS pbcopy integration
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
In macOS Terminal.app, enable "Use Option as Meta key" under Settings → Profiles → Keyboard. This lets you use Option+key combinations in tmux copy mode and readline word hopping (Option+f / Option+b).
iTerm2 has native tmux integration via Control Mode (-CC flag). This maps tmux windows and panes directly to native macOS iTerm2 tabs and split windows:
$ tmux -CC
# Or attach to existing session:
$ tmux -CC attach
To run tmux as a persistent background user daemon on macOS that starts on login, create a custom agent plist in ~/Library/LaunchAgents/com.user.tmux.plist:
$ launchctl load -w ~/Library/LaunchAgents/com.user.tmux.plist
Ensuring correct PATH resolution on ARM64 macOS machines.
On Apple Silicon (M1/M2/M3/M4), Homebrew installs binaries to /opt/homebrew/bin (unlike /usr/local/bin on older Intel Macs). Ensure your ~/.zprofile initializes Homebrew: eval "$(/opt/homebrew/bin/brew shellenv)".
When compiling tmux from source on Apple Silicon, pass the explicit Homebrew include and library directories to configure: CFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib" ./configure.
Modern GPU-accelerated terminals on macOS like Ghostty provide instantaneous text throughput inside tmux with native Metal graphics rendering and 24-bit True Color.
Solutions to common installation, terminfo, and clipboard issues on macOS.
eval "$(/opt/homebrew/bin/brew shellenv)" to your ~/.zprofile (or ~/.bash_profile), then restart your terminal.
tmux-yank plugin via TPM (set -g @plugin 'tmux-plugins/tmux-yank'), or manually bind copy-mode to pbcopy: bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy". Also ensure mouse mode is enabled: set -g mouse on.
~/.tmux.conf to enable full 256-color and true-color support: set -g default-terminal "tmux-256color" and set -ga terminal-overrides ",*256col*:Tc". Also ensure your terminal emulator (iTerm2 or Terminal.app) has 256-color support enabled in its profile settings.
reattach-to-user-namespace. Install it with brew install reattach-to-user-namespace and add to ~/.tmux.conf: set -g default-command "reattach-to-user-namespace -l $SHELL".
brew update && brew upgrade tmux. After upgrading, restart your tmux server by detaching all sessions and running tmux kill-server, or kill individual sessions with tmux kill-session -t <name>.
Compare tmux with cmux — the native macOS GUI terminal built for AI agents.
cmux vs tmux Guide →