Tmux has been a game-changer for my terminal workflow. If you’re still juggling multiple terminal windows or tabs, let me show you how I’ve configured tmux to make terminal work actually enjoyable.
What is Tmux?
Tmux (terminal multiplexer) lets you:
- Split your terminal into multiple panes
- Create and switch between windows
- Detach sessions and reattach later (even after SSH disconnects)
- Keep processes running in the background
Think of it as a window manager for your terminal.
My Configuration
The Prefix Key
The first thing I changed was the prefix key. Tmux uses Ctrl+b by default, but that’s awkward to reach. I use:
set -g prefix C-sCtrl+s is much more comfortable—your pinky stays on Ctrl while your ring finger hits S.
Mouse Support
Yes, I use the mouse in tmux. Fight me.
set -g mouse onThis lets you:
- Click to select panes
- Drag to resize panes
- Scroll through history
- Select text (hold Shift for native terminal selection)
VIM-Style Navigation
Moving between panes with arrow keys is slow. I use vim-style bindings:
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -RNow prefix + h/j/k/l moves left/down/up/right.
Window Numbering from 1
By default, tmux starts window numbering at 0. But your keyboard has 1-9 in a row, with 0 off to the side. Starting at 1 makes jumping to windows more intuitive:
set -g base-index 1Status Bar at the Top
I prefer the status bar at the top—it’s closer to where my eyes naturally look:
set-option -g status-position topQuick Config Reload
When tweaking your config, you don’t want to restart tmux every time:
unbind r
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."Now prefix + r reloads the config instantly.
Plugins I Use
I use TPM (Tmux Plugin Manager) to manage plugins:
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'pschmitt/tmux-ssh-split'
set -g @plugin 'catppuccin/tmux'tmux-sensible
Sensible defaults that should be built-in. Includes things like longer history, better key bindings, and faster key repetition.
tmux-prefix-highlight
Shows in your status bar when the prefix key is active. Helpful when you’re not sure if tmux registered your keypress.
tmux-ssh-split
This is a killer plugin. When you’re SSH’d into a remote server and split a pane, it automatically SSH’s into the same server in the new pane. No more typing SSH commands repeatedly.
set-option -g @ssh-split-keep-cwd "true"
set-option -g @ssh-split-keep-remote-cwd "true"
set-option -g @ssh-split-h-key "|"
set-option -g @ssh-split-v-key "A"Catppuccin Theme
A beautiful, easy-on-the-eyes theme. I configure it to show the window index, name, and current path:
set -g @catppuccin_window_default_text "#I:#W #{b:pane_current_path}"
set -g @catppuccin_window_current_text "#I:#W #{b:pane_current_path}"Essential Commands
| Command | Description |
|---|---|
prefix + c | Create new window |
prefix + , | Rename current window |
prefix + n/p | Next/previous window |
prefix + 1-9 | Jump to window number |
prefix + % | Split vertically (side by side) |
prefix + " | Split horizontally (top/bottom) |
prefix + z | Zoom current pane (toggle fullscreen) |
prefix + d | Detach from session |
tmux attach | Reattach to session |
prefix + r | Reload config (with my binding) |
SSH Split Commands
When you’re SSH’d into a remote server, these custom bindings create a new split that automatically connects to the same server:
| Command | Description |
|---|---|
prefix + | | SSH split horizontally |
prefix + A | SSH split vertically |
prefix + C | SSH split new window |
This is a huge time saver—no more typing ssh user@host repeatedly.
Scrolling
One thing that confuses tmux beginners: how do you scroll up to see previous output?
With mouse (easiest):
- Just scroll with your mouse wheel/trackpad
- In split panes: click the pane first, then scroll
With keyboard:
prefix + [→ Enter copy mode- Use arrow keys,
Page Up/Down, ork/jto scroll q→ Exit copy mode
In split panes with keyboard:
prefix + h/j/k/l→ Navigate to the pane you wantprefix + [→ Enter copy mode- Scroll around
q→ Exit copy mode
The Full Config
Here’s my complete ~/.tmux.conf:
# Plugin Manager
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'pschmitt/tmux-ssh-split'
set -g @plugin 'catppuccin/tmux'
# Mouse support
set -g mouse on
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
# Key bindings for arrow keys
setw -g xterm-keys on
# SSH split configuration
set-option -g @ssh-split-keep-cwd "true"
set-option -g @ssh-split-keep-remote-cwd "true"
set-option -g @ssh-split-h-key "|"
set-option -g @ssh-split-v-key "A"
set-option -g @ssh-split-w-key "C"
# Shell and prefix
set -g default-command /bin/zsh
set -g prefix C-s
# Status bar at top
set-option -g status-position top
# VIM-style pane navigation
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
# Quick reload
unbind r
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..."
# Catppuccin theme
set -g @catppuccin_window_default_text "#I:#W #{b:pane_current_path}"
set -g @catppuccin_window_current_text "#I:#W #{b:pane_current_path}"
# Start windows at 1
set -g base-index 1
# Initialize TPM (keep at bottom)
run '~/.tmux/plugins/tpm/tpm'Getting Started
- Install tmux:
brew install tmux - Install TPM:
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm - Copy the config above to
~/.tmux.conf - Start tmux:
tmux - Install plugins:
prefix + I(capital I)
Tmux took me from “drowning in terminal tabs” to “everything organized and persistent.” The learning curve is worth it. Start with the basics, add features as you need them, and soon you won’t be able to work without it.