Cheat Sheet
Tmux tips and tricks.
Install
apt update
apt install tmuxSessions
Create new
tmux new -s my-sessionUse existing session
tmux new -A -s my-sessionOr you can list all sessions:
tmux lsAnd attache to an existing one:
tmux attach-session -t my-sessionDelete/Kill session
Kill all sessions
tmux kill-serverKill specific session
tmux kill-session -t my-sessionKill other sessions
If you are inside a tmux session you would like to keep and kill all others, run:
tmux kill-session -aWindows and Panes
Ctrl+bcCreate a new window (with shell)Ctrl+bwChoose window from a listCtrl+b0Switch 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+boGo to the next paneCtrl+b;Toggle between the current and previous paneCtrl+bxClose the current paneEnable
synchronize-panes:ctrl+bthenshift :. Then typeset synchronize-panes onat the prompt. To disable synchronization:set synchronize-panes off.Ctrl+b[To enable copy mode. Use arrows to scroll.Ctrl+bAlt + 1All panels on vertical with same width.Or run
Ctrl+bShift + :select-layout even-vertical
Ctrl+bAlt + 2All panels on horizontal with same height.Or run
Ctrl+bShift + :select-layout even-horizontal
Last updated