Cheat Sheet
Tmux tips and tricks.
apt update
apt install tmux
tmux new -s my-session
tmux new -A -s my-session
Or you can list all sessions:
tmux ls
And attache to an existing one:
tmux attach-session -t my-session
tmux kill-server
tmux kill-session -t my-session
If you are inside a tmux session you would like to keep and kill all others, run:
tmux kill-session -a
Ctrl+b
c
Create a new window (with shell)Ctrl+b
w
Choose window from a listCtrl+b
0
Switch to window 0 (by number )Ctrl+b
,
Rename the current windowCtrl+b
%
Split current pane vertically into two panesCtrl+b
"
Split current pane horizontally into two panesCtrl+b
o
Go to the next paneCtrl+b
;
Toggle between the current and previous paneCtrl+b
x
Close the current pane- Enable
synchronize-panes
:ctrl+b
thenshift :
. Then typeset synchronize-panes on
at the prompt. To disable synchronization:set synchronize-panes off
. Ctrl+b
[
To enable copy mode. Use arrows to scroll.Ctrl+b
Alt + 1
All panels on vertical with same width.- Or run
Ctrl+b
Shift + :
select-layout even-vertical
Ctrl+b
Alt + 2
All panels on horizontal with same height.- Or run
Ctrl+b
Shift + :
select-layout even-horizontal
Last modified 3yr ago