Skip to main content
Back to Commands
MiscellaneousN/A (configuration command)

bind-key

Short form: bind

Bind a key to a command. The key is bound in the prefix table by default.

Synopsis

bash
tmux bind-key [-nr] [-N note] [-T key-table] key command [arguments]

Options

FlagDescription
-nBind in root table (no prefix needed)
-rKey may repeat
-T key-tableBind in specified table
-N noteAdd a note for list-keys

Examples

Bind Prefix+r to reload config

bash
tmux bind r source-file ~/.tmux.conf

Alt+Left for previous window (no prefix)

bash
tmux bind -n M-Left previous-window

Bind | for horizontal split

bash
tmux bind | split-window -h

Repeatable resize binding

bash
tmux bind -r H resize-pane -L 5

Default Keybinding

N/A (configuration command)

Default prefix is Ctrl+b

Pro Tips

  • Put bindings in .tmux.conf to persist across sessions
  • Use -n for bindings that don't require the prefix key
  • -r allows holding the key for repeated actions (useful for resize)