Ad 320×100
Developer

Tmux Cheat Sheet

Quick reference for Tmux — sessions, windows, panes, and key bindings

Default prefix key is Ctrl + b (shown as '<prefix>').
tmux

Start a new unnamed session

tmux new -s <name>

Start a new named session

tmux ls

List all sessions

tmux attach -t <name>

Attach to a named session

tmux attach -t <name> -d

Attach and detach other clients

tmux kill-session -t <name>

Kill a named session

tmux kill-server

Kill all sessions and the tmux server

tmux switch -t <name>

Switch to another session

tmux rename-session -t <old> <new>

Rename a session

<prefix> d

Detach from the current session

<prefix> s

List and switch between sessions interactively

<prefix> $

Rename the current session

<prefix> (

Switch to the previous session

<prefix> )

Switch to the next session

<prefix> c

Create a new window

<prefix> ,

Rename the current window

<prefix> &

Close the current window (with confirmation)

<prefix> w

List all windows interactively

<prefix> n

Move to the next window

<prefix> p

Move to the previous window

<prefix> 0-9

Switch to window by number

<prefix> l

Toggle to the last active window

<prefix> f

Find a window by name

tmux new-window -n <name>

Create a named window via command

tmux swap-window -t <n>

Swap current window with window n

tmux move-window -t <n>

Move current window to position n

<prefix> %

Split pane horizontally (left/right)

<prefix> "

Split pane vertically (top/bottom)

<prefix> x

Close the current pane (with confirmation)

<prefix> o

Cycle to the next pane

<prefix> ;

Toggle to the last active pane

<prefix> z

Toggle pane zoom (fullscreen)

<prefix> {

Move current pane left

<prefix> }

Move current pane right

<prefix> q

Show pane numbers (press number to switch)

<prefix> !

Convert the current pane into a new window

<prefix> Space

Cycle through pane layouts

tmux split-window -h

Split horizontally via command

tmux split-window -v

Split vertically via command

tmux join-pane -s <src> -t <dst>

Move a pane from one window to another

<prefix> ↑ ↓ ← →

Switch pane by direction (arrow keys)

<prefix> q then 0-9

Switch to a specific pane by number

tmux select-pane -t <n>

Select pane by index

tmux select-pane -L / -R / -U / -D

Select pane by direction

tmux select-window -t <n>

Select window by index

tmux select-window -t :<name>

Select window by name

tmux last-window

Switch to the last active window

tmux last-pane

Switch to the last active pane

<prefix> Ctrl+↑ / ↓ / ← / →

Resize pane by 1 cell in arrow direction

<prefix> Alt+↑ / ↓ / ← / →

Resize pane by 5 cells in arrow direction

tmux resize-pane -D 10

Resize pane down by 10 cells

tmux resize-pane -U 10

Resize pane up by 10 cells

tmux resize-pane -L 10

Resize pane left by 10 cells

tmux resize-pane -R 10

Resize pane right by 10 cells

tmux resize-pane -Z

Toggle pane zoom

tmux resize-pane -x 80 -y 24

Resize pane to exact dimensions

<prefix> [

Enter copy mode (scroll and select text)

q

Exit copy mode

↑ ↓ ← →

Navigate in copy mode

g / G

Go to top / bottom of buffer

/

Search forward in buffer

?

Search backward in buffer

Space

Start selection (in copy mode)

Enter

Copy selection and exit copy mode

<prefix> ]

Paste from tmux buffer

tmux show-buffer

Display the contents of the paste buffer

tmux save-buffer file.txt

Save paste buffer to a file

tmux list-buffers

List all paste buffers

<prefix> t

Show a large clock in the current pane

<prefix> ?

List all key bindings

<prefix> :

Open the tmux command prompt

tmux list-keys

List all key bindings (from command line)

tmux list-commands

List all tmux commands

tmux info

Show tmux server information

tmux display-message -p '#{window_index}'

Print a tmux variable value

tmux send-keys 'command' Enter

Send keystrokes to a pane programmatically

tmux capture-pane -p > output.txt

Capture pane contents to a file

tmux pipe-pane -o 'cat >> log.txt'

Log all pane output to a file

tmux source-file ~/.tmux.conf

Reload tmux configuration

set -g mouse on

Enable mouse support (click, scroll, resize)

set -g history-limit 10000

Set scrollback buffer size

set -g base-index 1

Start window numbering from 1

setw -g pane-base-index 1

Start pane numbering from 1

set -g default-terminal "screen-256color"

Enable 256-color terminal support

set -g status-interval 5

Update status bar every 5 seconds

set -g escape-time 0

Remove delay after pressing Escape

bind r source-file ~/.tmux.conf

Bind 'r' key to reload config

bind -n M-Left select-pane -L

Bind Alt+Arrow to switch panes without prefix

unbind C-b; set -g prefix C-a

Change prefix key from Ctrl+b to Ctrl+a

setw -g mode-keys vi

Use vi-style keys in copy mode

Key bindings shown use the default Tmux prefix (Ctrl+b). Your configuration may differ.

Ad 320×100

Tmux Cheat Sheet

A free, searchable tmux cheat sheet with the most useful commands, flags, and shortcuts in one place. Quickly look up syntax, copy commands, and learn tmux terminal multiplexing faster — perfect for beginners and a handy reference for experienced users.

FAQ

Is this tmux cheat sheet free?
Yes. The entire cheat sheet is free to browse and copy from, with no sign-up required.
Can I search for a specific command?
Yes. Use the search to filter the tmux commands instantly and jump straight to the syntax you need.
Who is the tmux cheat sheet for?
It suits everyone from newcomers learning tmux terminal multiplexing to power users who want a quick reminder of less-used flags and shortcuts.