Tool · tmux 3.4 to 3.8
tmux config generator
Pick a preset, change what you like, and copy a commented ~/.tmux.conf. Settings that are already the default on your tmux version are left out, and every configuration this tool can produce loads without errors in real tmux 3.4 and 3.8.
On this page
Generator
Live preview (approximate colors; the page theme stands in for your terminal)
# ~/.tmux.conf for tmux 3.8
# Made with https://tmux.app/config-generator/
# Apply changes: tmux source-file ~/.tmux.conf (or Prefix + r)
# Not set here because tmux 3.8 already defaults to: mouse on, escape-time 10
# ── General ───────────────────────────────────────────────────────────
# Number windows and panes from 1, so the first window is Prefix + 1
set -g base-index 1
setw -g pane-base-index 1
# Renumber windows when one is closed (no gaps such as 1 2 4)
set -g renumber-windows on
# Lines of scrollback kept per pane (applies to panes created after this is set)
set -g history-limit 50000
# Show messages for 2 seconds instead of 0.75
set -g display-time 2000
# Pass focus events to programs (Vim autoread, editors that save on blur)
set -s focus-events on
# Prefix + r reloads this file
bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# ── Panes and windows ─────────────────────────────────────────────────
# Split panes in the current directory (Prefix + % and Prefix + ")
bind % split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"
# New windows open in the current directory too
bind c new-window -c "#{pane_current_path}"
# ── Status line ───────────────────────────────────────────────────────
# Redraw the status line every 5 seconds (default 15)
set -g status-interval 5
# ── Colors and terminal ───────────────────────────────────────────────
# 24-bit true color when the outer terminal's TERM is xterm-256color (3.6+ also detects COLORTERM=truecolor)
set -as terminal-features ",xterm-256color:RGB"
Your custom keys
- Prefix rReload ~/.tmux.conf
- Prefix %Split left/right in the current directory
- Prefix "Split top/bottom in the current directory
- Prefix cNew window in the current directory
How to install the file
Quick answer
Where does the generated config go?
Save it as ~/.tmux.conf (or ~/.config/tmux/tmux.conf), then run tmux source-file ~/.tmux.conf in any running tmux, or start tmux again. The fastest way over SSH is Copy as shell command: paste it into the terminal and it backs up your old file to .bak, writes the new one and reloads tmux.
Copy or download the config
Click Copy config and paste it into your editor, or click Download. The download is called
tmux.confbecause some browsers rename files that start with a dot; move it into place:shellmv ~/Downloads/tmux.conf ~/.tmux.confFor the XDG location instead:
mkdir -p ~/.config/tmux && mv ~/Downloads/tmux.conf ~/.config/tmux/tmux.conf.Install TPM if you picked plugins
With Install TPM automatically ticked, tmux clones TPM and the plugins the first time it starts (it needs
git). Otherwise clone it once yourself:shellgit clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpmThen press Ctrl+b I (capital i) inside tmux to fetch the plugins. More on plugins: Plugins & TPM.
Reload tmux
Inside tmux, run the command below or press Ctrl+b : and type
source-file ~/.tmux.conf. After this first reload, Ctrl+b r works if you kept the reload key.shelltmux source-file ~/.tmux.conf
Next steps
Check that tmux read the file you think it read. This prints the config files of the running server (on 3.8 it lists every path it looked at, on 3.4 only the files that exist):
tmux display-message -p '#{config_files}'To try a config without touching your running sessions, start a separate server on its own socket. It has its own sessions and does not read your normal config:
tmux -L test -f ~/Downloads/tmux.conf newIf tmux prints invalid option or unknown command, the file was made for a newer tmux than the one you run: pick your version in the Target box above (run tmux -V) and copy it again. To see what every option does, read the options reference; for colors and the 3.8 theme option see themes and colors; and if something looks wrong, troubleshooting covers colors, Esc delay and configs that do not apply.
What each preset sets
Presets are starting points: pick one, then change anything. Every preset keeps the tmux defaults it does not mention, and the Target and File choices stay as they are when you switch.
| Setting | Minimal | Sensible | Vim user | Screen refugee | Power user |
|---|---|---|---|---|---|
| Prefix | Ctrl+b | Ctrl+b | Ctrl+b | Ctrl+a | Ctrl+a |
| Windows from 1 | Yes | Yes | Yes | No | Yes |
| Scrollback | 10,000 | 50,000 | 50,000 | 10,000 | 100,000 |
| Splits in current directory | No | % and " | | and - | | and - | | and - |
| Copy mode | Default | Default | vi, v / y | Default | vi, v / y |
| Pane movement | Arrows | Arrows | h j k l | Arrows | h j k l and Alt+arrows |
| Status bar | Default | Default | Default | Default | Top, dark, pane titles |
| True color | No | Yes | Yes | Yes | Yes |
| Plugins | None | None | vim-tmux-navigator | None | sensible, resurrect, continuum, yank |

How this was captured
Captured 2026-10-29 00:03 UTC from a real xterm window running tmux 3.8 on Ubuntu 24.04. Nothing is mocked up. The commands that set up the screen:
# ~/.tmux.conf: # ~/.tmux.conf for tmux 3.8
# ~/.tmux.conf: # Made with https://tmux.app/config-generator/
# ~/.tmux.conf: # Apply changes: tmux source-file ~/.tmux.conf (or Prefix + r)
# ~/.tmux.conf: # Not set here because tmux 3.8 already defaults to: mouse on, escape-time 10
# ~/.tmux.conf: # ── Prefix key ────────────────────────────────────────────────────────
# ~/.tmux.conf: # Use Ctrl+a as the prefix instead of Ctrl+b
# ~/.tmux.conf: unbind C-b
# ~/.tmux.conf: set -g prefix C-a
# ~/.tmux.conf: # Press Ctrl+a twice to send it to the program inside the pane
# ~/.tmux.conf: bind C-a send-prefix
# ~/.tmux.conf: # ── General ───────────────────────────────────────────────────────────
# ~/.tmux.conf: # Number windows and panes from 1, so the first window is Prefix + 1
# ~/.tmux.conf: set -g base-index 1
# ~/.tmux.conf: setw -g pane-base-index 1
# ~/.tmux.conf: # Renumber windows when one is closed (no gaps such as 1 2 4)
# ~/.tmux.conf: set -g renumber-windows on
# ~/.tmux.conf: # Lines of scrollback kept per pane (applies to panes created after this is set)
# ~/.tmux.conf: set -g history-limit 100000
# ~/.tmux.conf: # Show messages for 2 seconds instead of 0.75
# ~/.tmux.conf: set -g display-time 2000
# ~/.tmux.conf: # Pass focus events to programs (Vim autoread, editors that save on blur)
# ~/.tmux.conf: set -s focus-events on
# ~/.tmux.conf: # Set the terminal window title to session and window name
# ~/.tmux.conf: # Mark windows with new output in the status line
# ~/.tmux.conf: setw -g monitor-activity on
# ~/.tmux.conf: # Prefix + r reloads this file
# ~/.tmux.conf: bind r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
# ~/.tmux.conf: # ── Copy mode and clipboard ───────────────────────────────────────────
# ~/.tmux.conf: # vi keys in copy mode (h/j/k/l, /, ?, w, b ...)
# ~/.tmux.conf: setw -g mode-keys vi
# ~/.tmux.conf: # Vim-like selection: v starts, Ctrl+v toggles block mode, y copies and exits
# ~/.tmux.conf: bind -T copy-mode-vi v send-keys -X begin-selection
# ~/.tmux.conf: bind -T copy-mode-vi C-v send-keys -X rectangle-toggle
# ~/.tmux.conf: bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel
# ~/.tmux.conf: # Let programs inside tmux (Neovim, ssh sessions) set the clipboard with OSC 52,
# ~/.tmux.conf: # and send copies to your terminal's clipboard
# ~/.tmux.conf: set -s set-clipboard on
# ~/.tmux.conf: # Line numbers in copy mode (new in tmux 3.7)
# ~/.tmux.conf: setw -g copy-mode-line-numbers absolute
# ~/.tmux.conf: # ── Panes and windows ─────────────────────────────────────────────────
# ~/.tmux.conf: # Prefix + | splits left/right and Prefix + - splits top/bottom, in the current directory
# ~/.tmux.conf: # (- replaces the default delete-buffer key; % and " keep working)
# ~/.tmux.conf: bind | split-window -h -c "#{pane_current_path}"
# ~/.tmux.conf: bind - split-window -v -c "#{pane_current_path}"
# ~/.tmux.conf: bind % split-window -h -c "#{pane_current_path}"
# ~/.tmux.conf: bind '"' split-window -v -c "#{pane_current_path}"
# ~/.tmux.conf: # New windows open in the current directory too
# ~/.tmux.conf: bind c new-window -c "#{pane_current_path}"
# ~/.tmux.conf: # Prefix + h/j/k/l moves between panes like Vim
# ~/.tmux.conf: # (l replaces last-window; Prefix + ; still goes to the last pane)
# ~/.tmux.conf: bind h select-pane -L
# ~/.tmux.conf: bind j select-pane -D
# ~/.tmux.conf: bind k select-pane -U
# ~/.tmux.conf: bind l select-pane -R
# ~/.tmux.conf: # Alt + arrow keys move between panes without the prefix
# ~/.tmux.conf: bind -n M-Left select-pane -L
# ~/.tmux.conf: bind -n M-Right select-pane -R
# ~/.tmux.conf: bind -n M-Up select-pane -U
# ~/.tmux.conf: bind -n M-Down select-pane -D
# ~/.tmux.conf: # Prefix + H/J/K/L resizes the pane by 5 cells; hold the letter to repeat
# ~/.tmux.conf: # (L replaces switch-client -l)
# ~/.tmux.conf: bind -r H resize-pane -L 5
# ~/.tmux.conf: bind -r J resize-pane -D 5
# ~/.tmux.conf: bind -r K resize-pane -U 5
# ~/.tmux.conf: bind -r L resize-pane -R 5
# ~/.tmux.conf: # ── Status line ───────────────────────────────────────────────────────
# ~/.tmux.conf: # Status line at the top of the screen
# ~/.tmux.conf: set -g status-position top
# ~/.tmux.conf: # Redraw the status line every 5 seconds (default 15)
# ~/.tmux.conf: set -g status-interval 5
# ~/.tmux.conf: # Status line colors, with the current window highlighted
# ~/.tmux.conf: set -g status-style "bg=#1e2030,fg=#c0caf5"
# ~/.tmux.conf: setw -g window-status-style "fg=#c0caf5"
# ~/.tmux.conf: setw -g window-status-current-style "bg=#7aa2f7,fg=#1e2030,bold"
# ~/.tmux.conf: setw -g window-status-format " #I:#W#{?window_flags,#{window_flags},} "
# ~/.tmux.conf: setw -g window-status-current-format " #I:#W#{?window_flags,#{window_flags},} "
# ~/.tmux.conf: setw -g window-status-separator ""
# ~/.tmux.conf: # Left: the session name in bold
# ~/.tmux.conf: set -g status-left "#[bold] #S #[default] "
# ~/.tmux.conf: set -g status-left-length 30
# ~/.tmux.conf: # Right: host name and time
# ~/.tmux.conf: set -g status-right " #h | %H:%M "
# ~/.tmux.conf: set -g status-right-length 50
# ~/.tmux.conf: # ── Pane borders ──────────────────────────────────────────────────────
# ~/.tmux.conf: # Draw pane borders with heavy lines
# ~/.tmux.conf: setw -g pane-border-lines heavy
# ~/.tmux.conf: # Show each pane's number and running command in its border
# ~/.tmux.conf: setw -g pane-border-status top
# ~/.tmux.conf: setw -g pane-border-format " #P: #{pane_current_command} "
# ~/.tmux.conf: # Active pane border color (still yellow in copy mode and red when panes are synchronized)
# ~/.tmux.conf: setw -g pane-active-border-style "#{?pane_in_mode,fg=yellow,#{?synchronize-panes,fg=red,fg=#7aa2f7}}"
# ~/.tmux.conf: # ── Colors and terminal ───────────────────────────────────────────────
# ~/.tmux.conf: # 24-bit true color when the outer terminal's TERM is xterm-256color (3.6+ also detects COLORTERM=truecolor)
# ~/.tmux.conf: set -as terminal-features ",xterm-256color:RGB"
# ~/.tmux.conf: # Extended keys, so programs can tell Ctrl+Shift and Ctrl+Enter apart
# ~/.tmux.conf: set -s extended-keys on
# ~/.tmux.conf: set -as terminal-features ",xterm*:extkeys"
# ~/.tmux.conf: # Allow passthrough escape sequences (images in yazi, kitty graphics)
# ~/.tmux.conf: setw -g allow-passthrough on
tmux new-session -d -s work -n code -x 100 -y 25
tmux split-window -h -t work:code
tmux split-window -v -t work:code.2
tmux new-window -d -t work -n logs
tmux send-keys -t work:code.1 'clear; ls -la' Enter
tmux send-keys -t work:code.2 'clear; tmux -V; tmux show -gv prefix' Enter
tmux send-keys -t work:code.3 'clear; top -b -n 1 | head -8' Enter
tmux select-pane -t work:code.1Choosing a prefix key
Every tmux shortcut starts with the prefix. The default, Ctrl+b, works on every machine without a config, which matters if you often log in to servers you do not control. It costs you readline's "back one character" and Vim's page up.
Ctrl+a
The GNU Screen prefix, and the most common change. A sits on the home row, and with Caps Lock mapped to Control it is one small move. You lose Ctrl+a for "start of line" in the shell, so the generator binds the prefix twice (or Prefix + a in Screen style) to send it through.
Ctrl+Space
Splits the chord across both hands: little finger on Ctrl, thumb on Space. Check first: macOS uses Ctrl+Space to switch input sources, and some input methods on Linux take it too.
Ctrl+s
Easy to reach and unused by most shells inside tmux. It clashes with tmux-resurrect's save key (Prefix + Ctrl+s), and outside tmux it can freeze terminals that still use XON/XOFF flow control.
Backtick
A single key with no modifier. You will type ` ` whenever you need a real backtick, which gets old in shell scripts and Markdown.
The Ctrl+b ? key lists every binding with the prefix you chose, and the cheat sheet can show all default keys with any prefix.
How the generated configs are tested
A test script (src/scripts/validate-generator.mjs) builds 844 configurations: every preset for every target version, both file locations and both defaults modes, every clipboard, prefix and theme option, plus 400 random combinations of all controls. Each one is loaded twice into a fresh tmux server with source-file (the way Ctrl+b r reloads it) and then used as the startup config of another server. Targets 3.6 and 3.8 run on tmux 3.8, target 3.4 on Ubuntu's tmux 3.4. On 28 October 2026 all 844 loaded with no errors. TPM was replaced by a stub, so plugins themselves were not downloaded.
What tmux 3.6 adds that the generator uses (pane scrollbars, the spaces border style, COLORTERM detection) comes from the official changelog; the 3.6 target was not loaded into a real 3.6 build.
Frequently asked questions
Where should I save the generated .tmux.conf file?
In your home directory as ~/.tmux.conf, or as ~/.config/tmux/tmux.conf if you keep dotfiles in XDG folders. tmux reads /etc/tmux.conf first and then every one of ~/.tmux.conf, $XDG_CONFIG_HOME/tmux/tmux.conf and ~/.config/tmux/tmux.conf that exists, so keep only one of them to avoid surprises. Details: config file location.
How do I reload tmux after changing my .tmux.conf?
Run tmux source-file ~/.tmux.conf from a shell, or press Ctrl+b : and type source-file ~/.tmux.conf. If your config has the reload binding, Ctrl+b r does the same. Reloading does not remove settings you deleted from the file; restart the server with tmux kill-server for that.
Why is Ctrl+a popular as a custom prefix key?
It was the prefix of GNU Screen, which many people used before tmux, and A sits on the home row right under the left little finger, so it is faster than reaching for B. The cost is that Ctrl+a also moves to the start of the line in bash and zsh; bind the prefix to send-prefix (press it twice) to keep that.
Why is set -g mouse on missing from my config?
tmux 3.8 turns the mouse on by default, so the generator leaves the line out when the target is 3.8 and notes it at the top of the file. Pick 3.4 or 3.6 as the target, or choose Show as comments, and the line appears. The same goes for escape-time 10, the default since tmux 3.5.
Will this overwrite my current config?
Only if you save over it. The Copy as shell command button writes the file but first copies any existing one to ~/.tmux.conf.bak. To combine the two, paste the generated lines at the end of your file: later lines win.
Can I use the generator with Oh my tmux?
Not as a whole file: Oh my tmux owns ~/.tmux.conf and wants your changes in ~/.tmux.conf.local. You can paste single lines from here into the user section of that file. See customizing Oh my tmux.
How do I share or come back to my settings?
Every change is stored in the page address, so bookmark it or use Copy share link. The link is also written at the top of the generated file when you change anything from the defaults.
Keep learning
Something wrong or out of date on this page? Email hello@tmux.app and we will fix it.