TMUX Cheatsheet!

Responsive HTML version of my original.

Tmux Command

List / Create / Attach / Rename / Kill Sessions
tmux ls
tmux new -s <session>
tmux att -t <session>
tmux rename-session -t <old> <new>
tmux kill-session -t <session>

Controls

^b <cmd>
Prefix tmux commands with Control-B
^b ^b
Send a Control-B to program instead of tmux
^b : <cmd> <enter>
Enter a Tmux command
^b d
Detach from Tmux

Copy / Paste

^b [
Enter Copy Mode
move cursor
Use Vim/Emacs movement keys Move to start of copy
space
Mark start of copy
move cursor
Use Vim/Emacs movement keys Move to end of copy
enter
Choose end of copy
^b ]
Paste

Basic Vim Cursor Motions

h j k l
Character Left / Down / Up / Right (lower "L")
w b
Start of Word Forward / Backward
e
End of Word Forward
} {
Paragraph Forward / Backward
) (
Sentence Forward / Backward
/ ?
Forward to Backward to matched pattern
See my Vim Cheat Sheet for more

Session (Set of Windows)

Create new session (with optional name)
^b :new -s <session>
^b $
Rename
^b s
List
^b (
Next
^b )
Previous

Window (Tab)

^b w
List
^b c
Create
^b , <name>
Rename
^b l
Last (lower-case "L")
^b &
Close
^b <number>
Go to window by number
^b n
Next
^b p
Previous
^b w <name>
Choose by name

Pane (Split Window)

^b "
Split Horizontally —
^b %
Split Vertically |
^b <arrow>
Select
^b {
Previous
^b }
Next
^b o
Switch
^b ^o
Swap
^b ;
Last

Pane Management (Split Window)

^b q
Show Number
^b !
Pane to Window
^b x
Kill
^b space
Reorganize
^b <alt+arrow>
Expand
^b ^<arrow>
Resize
^b <number> <arrow>
Resize by count

Access this page in your terminal

Setup this alias in your .bashrc or .zshrc profile to get the original version of this page:

alias tmhelp="curl https://gist.githubusercontent.com/afair/3489752/raw/"

Then you can use that command (or call it one you prefer) to print a text-version of this page:

tmhelp