Why Tmux?
Tmux is a terminal multiplexer. It lets you run multiple terminal sessions inside a single window, detach and reattach to sessions (so your work survives SSH disconnects), and split your screen into panes — all without touching a mouse.
Once you start using it, you wonder how you ever lived without it.
Why did the tmux user break up with their terminal emulator? Because they needed more sessions than the relationship could handle.
Installing Tmux
Debian / Ubuntu
sudo apt update && sudo apt install -y tmux
macOS (Homebrew)
brew install tmux
Verify with tmux -V.
My Tmux Config
The config file lives at ~/.tmux.conf. Here is what I ended up with and why.
Start with sane defaults
# Use C-a instead of C-b as the prefix — easier to reach
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Start window and pane numbering at 1 (0 is too far away)
set -g base-index 1
setw -g pane-base-index 1
# Renumber windows when one is closed
set -g renumber-windows on
Better splitting
# Split panes with | and - (intuitive)
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
The -c "#{pane_current_path}" part is key — new panes open in the same directory you were working in, not your home directory.
Navigate panes with Alt+arrow (no prefix needed)
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
Mouse support
set -g mouse on
Yes, I use the mouse in tmux. Fight me. It makes scrolling, selecting panes, and resizing trivial.
256 colors and true color
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
This is the line that matters for GNOME Terminal (more on that below).
History and responsiveness
set -g history-limit 50000
set -g escape-time 0
set -g display-time 4000
set -g status-interval 5
set -g focus-events on
escape-time 0 eliminates the delay after pressing Escape — critical if you use Vim inside tmux.
Status bar
set -g status-style 'bg=#1d2021 fg=#ebdbb2'
set -g status-left '#[fg=#fabd2f,bold] #S '
set -g status-right '#[fg=#83a598] %H:%M '
set -g window-status-current-style 'fg=#fabd2f,bold'
set -g window-status-style 'fg=#928374'
Reload config without restarting
bind r source-file ~/.tmux.conf \; display "Config reloaded"
This one is a lifesaver while you are iterating on the config. Prefix + r and done.
The Full Config
Here it is in one block so you can just drop it into ~/.tmux.conf:
unbind C-b
set -g prefix C-a
bind C-a send-prefix
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
set -g mouse on
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
set -g history-limit 50000
set -g escape-time 0
set -g display-time 4000
set -g status-interval 5
set -g focus-events on
set -g status-style 'bg=#1d2021 fg=#ebdbb2'
set -g status-left '#[fg=#fabd2f,bold] #S '
set -g status-right '#[fg=#83a598] %H:%M '
set -g window-status-current-style 'fg=#fabd2f,bold'
set -g window-status-style 'fg=#928374'
bind r source-file ~/.tmux.conf \; display "Config reloaded"
Tmux Cheat Sheet
The stuff I actually use daily:
| Action | Keys |
|---|---|
| New session | tmux new -s name |
| Detach | Prefix + d |
| Reattach | tmux attach -t name |
| List sessions | tmux ls |
| New window | Prefix + c |
| Next / prev window | Prefix + n / Prefix + p |
| Split horizontal | Prefix + | |
| Split vertical | Prefix + - |
| Kill pane | Prefix + x |
| Reload config | Prefix + r |
(Remember, Prefix is Ctrl+a with the config above.)
Tmux + GNOME Terminal
GNOME Terminal works great with tmux. A few things to set up so they play nicely together:
Color support — GNOME Terminal supports 256 colors out of the box. The terminal-overrides line in the config above ensures true color (24-bit) passes through correctly. Without it, color themes in Vim/Neovim inside tmux look washed out.
Keyboard — GNOME Terminal can intercept some key combos before tmux sees them. If Alt+Arrow pane navigation does not work, go to GNOME Terminal preferences and disable the menu access key (Edit > Preferences > General > uncheck “Enable menu access keys”). Alt shortcuts in the terminal profile may also need to be set to “None” so they pass through to tmux.
Font — Set a monospace/nerd font in GNOME Terminal preferences (I use JetBrains Mono Nerd Font). Tmux status bar and any powerline symbols will render correctly.
Copy/paste — With set -g mouse on, you can select text in tmux. Hold Shift while selecting to use GNOME Terminal’s native selection (copies to system clipboard). Without Shift, tmux captures the selection into its own buffer. Both are useful: tmux buffer for pasting within tmux (Prefix + ]), system clipboard for pasting elsewhere.
Tip: Add this to .bashrc or .zshrc to auto-attach to a tmux session when opening GNOME Terminal:
if command -v tmux &>/dev/null && [ -z "$TMUX" ]; then
tmux attach -t default || tmux new -s default
fi
Now every new GNOME Terminal window drops you into tmux automatically.
Alacritty — A Simple, Fast Terminal
Alacritty is a GPU-accelerated terminal emulator. That is basically the entire pitch: it is fast and it stays out of your way.
Install Alacritty
Debian / Ubuntu:
sudo add-apt-repository ppa:aslatter/ppa -y
sudo apt update
sudo apt install -y alacritty
If the PPA is not available for your release, you can install from source:
sudo apt install -y cmake pkg-config libfreetype6-dev libfontconfig1-dev \
libxcb-xfixes0-dev libxkbcommon-dev python3
cargo install alacritty
(You need Rust/Cargo for the source install — curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh if you do not have it.)
macOS (Homebrew):
brew install --cask alacritty
Quick Start
Alacritty configuration lives in ~/.config/alacritty/alacritty.toml (TOML since v0.13, used to be YAML).
A minimal config to get going:
[font]
size = 13.0
[font.normal]
family = "JetBrains Mono Nerd Font"
[window]
opacity = 0.95
padding = { x = 8, y = 8 }
[colors.primary]
background = "#1d2021"
foreground = "#ebdbb2"
That is it. Launch alacritty and you have a working terminal.
Pros
- Fast — GPU rendering means no lag, even with heavy output. Scrolling through massive log files is noticeably smoother than most terminals.
- Simple — One config file, no tabs, no splits, no profiles, no menus. It does one thing.
- Cross-platform — Same config on Linux, macOS, and Windows.
- Low resource usage — Minimal memory footprint compared to Electron-based terminals.
Cons
- No tabs or splits — By design. This is where tmux comes in. Alacritty deliberately offloads multiplexing to tmux. If you do not use tmux, Alacritty will feel crippled.
- No GUI settings — Everything is in the config file. If you want a preferences window, look elsewhere.
- No scrollback search — The built-in scrollback is basic. Again, tmux fills this gap.
- Font rendering — On some Linux setups, font rendering can look slightly different than GTK-based terminals. Usually solved by picking the right font and tweaking hinting.
Why Tmux Is a Must-Have for Alacritty
Alacritty + tmux is the combo. Alacritty handles rendering fast. Tmux handles everything else — splits, tabs (windows), sessions, detach/reattach. The Alacritty philosophy is literally “use a multiplexer” instead of building those features in.
Add the same auto-attach snippet to your shell config:
if command -v tmux &>/dev/null && [ -z "$TMUX" ]; then
tmux attach -t default || tmux new -s default
fi
And make sure Alacritty’s TERM is set correctly for tmux:
[env]
TERM = "xterm-256color"
Now Alacritty launches straight into tmux with full color support. You get the speed of Alacritty and the power of tmux. Best of both worlds.
