Tmux Cheat Sheet & Quick Reference

Start a new session

tmux
tmux new
tmux new-session

Start a new session with the name mysession

tmux new -s mysession

kill/delete session mysession

tmux kill-session -t mysession

kill/delete all sessions but the current

tmux kill-session -a

kill/delete all sessions but mysession

tmux kill-session -a -t mysession

Show all sessions

tmux ls
tmux list-sessions

Attach to a session with the name mysession

tmux a -t mysession
tmux at -t mysession
tmux attach -t mysession
tmux attach-session -t mysession

Rename session

Ctrl + b $

Detach from session

Ctrl + b d

Create window

Ctrl + b c

Rename current window

Ctrl + b ,

Close current window

Ctrl + b &

Previous window

Ctrl + b p

Next window

Ctrl + b n

Switch/select window by number

Ctrl + b 0 ... 9

Scroll

Ctrl-b [
# Press q to quit scroll mode
Ctrl-b PgUp

References
https://tmuxcheatsheet.com/
https://gist.github.com/MohamedAlaa/2961058