Tmux Shortcuts

What is Tmux?

Tmux is a terminal multiplexer that lets you split terminals into panes, create multiple windows, and detach/reattach sessions.

A tmux session contains windows (like tabs), each with panes (split views).

Sessions

Independent terminal workspaces that persist after disconnection

tmux new -s mynameCreate
Ctrl+b dDetach
tmux attach -t mynameReattach

Windows

Like tabs in your browser, each with its own terminal

Ctrl+b cCreate new
Ctrl+b n/pNext/prev
Ctrl+b 0-9Jump to #

Panes

Split views within a window for parallel work

Ctrl+b %Split vert
Ctrl+b "Split horiz
Ctrl+b arrowsNavigate
> Ctrl+b is the default prefix key that tells tmux to interpret the following keystroke as a command.
Common workflow: Start with tmux new -s myname, detach with Ctrl+b d, and reattach with tmux attach -t myname

All Shortcuts

Create new session#1
tmux new -s <n>

Creates a new named tmux session

List sessions#2
tmux ls

Shows all active tmux sessions

Attach to session#3
tmux attach -t <n>

Connect to an existing tmux session

Detach from session#4
ctrl+bd

Disconnect from current session without terminating it

Kill/terminate session#5
tmux kill-session -t <n>

Completely terminates specified session

Rename session#6
ctrl+b$

Change the name of your current session

Switch to previous session#7
ctrl+b(
Switch to next session#8
ctrl+b)
Interactive session selection#9
ctrl+bs

Opens a menu to select and switch between sessions

Create new window#10
ctrl+bc

Creates a new window within the current session

Switch to window by number#11
ctrl+b<number>

Jump directly to a specific window (0-9)

List windows for selection#12
ctrl+bw

Shows a menu with all windows for easy switching

Rename current window#13
ctrl+b,
Move to previous window#14
ctrl+bp
Move to next window#15
ctrl+bn
Find window by name#16
ctrl+bf

Search for a window by name

Kill current window#17
ctrl+b&

Closes the current window (with confirmation)

Swap window positions#18
ctrl+b.

Moves current window to a different position

Split pane horizontally#19
ctrl+b"

Divides the current pane into top and bottom sections

Split pane vertically#20
ctrl+b%

Divides the current pane into left and right sections

Move to pane by direction#21
ctrl+bArrow Key

Navigate between panes using arrow keys

Toggle pane zoom#22
ctrl+bz

Maximize current pane temporarily (toggle)

Show pane numbers#23
ctrl+bq

Displays pane numbers for quick selection

Convert pane to window#24
ctrl+b!

Breaks the current pane out to its own window

Kill current pane#25
ctrl+bx

Closes the current pane (with confirmation)

Rotate panes#26
ctrl+bCtrl+o

Rotate pane arrangement

Resize pane left#27
ctrl+bCtrl+Left
Resize pane right#28
ctrl+bCtrl+Right
Resize pane up#29
ctrl+bCtrl+Up
Resize pane down#30
ctrl+bCtrl+Down
Swap panes#31
ctrl+b{

Swap with previous pane

Swap panes#32
ctrl+b}

Swap with next pane

Enter copy mode#33
ctrl+b[

Allows scrolling, searching, and text selection

Exit copy mode#34
q

While in copy mode

Start selection#35
Space

Begin text selection in copy mode

Copy selection#36
Enter

Copy selected text to tmux buffer

Paste buffer#37
ctrl+b]

Paste the most recently copied text

Move cursor in copy mode#38
hjkl

Navigate using vi-style keys (if configured)

Page up/down#39
Ctrl+bCtrl+f

Scroll full pages in copy mode

Half page up/down#40
Ctrl+uCtrl+d

Scroll half pages in copy mode

Search forward#41
/

Search forward in copy mode (vi mode)

Search backward#42
?

Search backward in copy mode (vi mode)

Next search match#43
n

Find next match in copy mode

Previous search match#44
N

Find previous match in copy mode

Reload tmux config#45
ctrl+b:source-file ~/.tmux.conf

Reloads your tmux configuration file

List key bindings#46
ctrl+b?

Shows all configured key bindings

Enter command mode#47
ctrl+b:

Opens the tmux command prompt

Set new prefix key#48
{In ~/.tmux.conf: set -g prefix C-a}

Example changes prefix from Ctrl+b to Ctrl+a

Toggle status bar#49
ctrl+b:set -g status

Toggles visibility of the status bar

Show tmux info#50
ctrl+bi

Display information about the current session

Toggle mouse mode#51
ctrl+b:set -g mouse on/off

Enables/disables mouse support

Set window title#52
ctrl+b,

Change the title of the current window

Synchronized panes#53
ctrl+b:setw synchronize-panes on/off

Send commands to all panes simultaneously

Join pane from another window#54
ctrl+b:join-pane -s window#.pane#

Joins a pane from another window to current window

Send pane to another window#55
ctrl+b:join-pane -t window#.pane#

Sends current pane to another window

Save pane output to file#56
ctrl+b:capture-panectrl+b:save-buffer filename.txt

Captures current pane content and saves to file

Display pane clock#57
ctrl+bt

Shows a clock in the current pane

Lock screen#58
ctrl+bCtrl+x

Locks the tmux client

Switch layout#59
ctrl+bSpace

Cycles through available pane layouts

Link window from another session#60
ctrl+b:link-window -s src-session:src-window

Links a window from another session to current session

Suspend client#61
ctrl+bCtrl+z

Suspends the tmux client

Monitor for activity#62
ctrl+bM

Toggle activity monitoring for a window

Monitor for silence#63
ctrl+b_

Set monitoring for a period of silence