Tmux

Table of Contents

1. Keybindings

Prefix C-b

  • C-z suspend the clinet

1.1. Panes

  • " (spiltp) split pane horizontally
  • % split pane vertically
  • <arrow> change pane
  • o next pane in current window
  • ; previously active pane
  • C-o rotate forward
  • M-1, …, M-5 preset layout
  • SPC next preset layout
  • C-<arrow> resize by one cell, M-<arrow> resize by five cells
  • {, } swap current pane with previous or next pane
  • m mark current pane
  • z toggle maximization of current pane
  • x (kill-pane) kill current pane

1.2. Windows

  • c (new-window) create new window
  • ' select by window index
  • 0, …, 9 select window
  • n, p next and previous window
  • l previously selected winodw
  • & (kill-window) kill current window
  • , rename current window

1.3. Sessions

  • d (detach-client) detach

Session is stored in RAM, so they do not survive reboot. For session to persist:

  • Set up sessions on startup via tmux command.
  • Use tmux-resurrect package from TPM (Tmux Package Manager).

2. Commands

Command can be executed within a client by entering the command prompt with :, or give command directly to the command line via tmux <command>.

  • set-option OPTION VAR VAL (alias set)
    • Scope: -g global, -s session, -w window, -p pane
    • prefix the prefix key (C-a is a common rebinding)
  • bind-key KEY FUNC, unbind-key KEY the keys are given in the Emacs format

3. Configuration

Tmux commands are used in the config files: in the order of precedence,

  • ~/.tmux.conf
  • $XDG_CONFIG_HOME/tmux/tmux.conf
  • ~/.config/tmux/tmux.conf
  • /etc/tmux.conf

Author: Jeemin Kim

Created: 2026-07-16 Thu 21:34