Janik von Rotz

2 min read

Tmux Cheat Sheet

Tmux is a terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time. It can also be used to detach processes from their controlling terminals, allowing SSH sessions to remain active without being visible.


See https://github.com/tmux/tmux/wiki/Installing for details.


Start new session.

Attach to last session.
tmux a

Show time.
ctrl + b t

Kill session.
tmux kill-session


Create new window.
ctrl + b c

Rename new window.
ctrl + b ,

Close window.
ctrl + b &

Select window.
ctrl + b [0-9]


Split vertically.
ctrl + b %

Toggle last active pane.
ctrl + b ;

Split horizontally.
ctrl + b

Switch to pane to the direction.
ctrl + b [h,j,k,l]

Close current pane.
ctrl + b x

Move pane right.
ctrl + b }

Move pane left.
ctrl + b {

Convert pane into a window.
ctrl + b !

Resize pane vertically. ctrl + b + ↑ ctrl + b + ↓

Resize pane horizontally. ctrl + b + ← ctrl + b + →


Detach from session.
ctrl + b d

Attach to last session.
tmux a

Rename session.
ctrl + b $

List sessions.
ctrl + b s

Attach to named session.
tmux a -t name

Start new session.
ctrl + b :new

Copy Mode

Enter copy mode.
ctrl + b [ or v

Search down.

Search up.

Next keyword occurance.

Navigate up and down.
ctrl + u ctrl + d

Start selection.

Copy selection.

Paste selection.
ctrl + b ]

List buffers.
ctrl + b :list-buffer

Paste buffer selection.

Save buffer.
save-buffer buf.txt

Return to normal mode.
ctrl + c



Save session.
ctrl + b ctrl + s

Restore session.
ctrl + b ctrl + r

Categories: Unix
Tags: tmux , cheat sheet , man page
Improve this page
Show statistic for this page