Tmux Cheat Sheet

A Software › Linux cheat sheet in English by nerv

Terminal multiplexer for Unix-like operating systems

2,976 views 944 downloads 21 Jul 2022 History

Commands

tmux
start
tmux new
start new session without name
tmux new -s <sn>
start with session name sn
tmux a -t
reattach session
tmux a -t <sn>
reattach named session
tmux attach
attach to previous session
tmux attach -t <sn>
attach to sn session
tmux restore
restore session
tmux ls
get list sessions
tmux kill-s­ession -t <sn>
close sessioon sn
tmux kill-s­erver
shutdown all sessions

Hot-keys

Ctrl-B c
new window
Ctrl-B n
go to next window
Ctrl-B p
go to previous window
Ctrl-B 0..9
go to 0..9 window
Ctrl-B w
get list all windows
Ctrl-B l
go to previous window
Ctrl-B "
separate window horizontal
Ctrl-B %
separate window vertical
Ctrl-B →←↑↓
select panel
Ctrl-B x
close panel
Ctrl-B &
close window
Ctrl-B d
detach of session

Config­uration

set-option -g -q mouse on
bind-key -T root WheelU­pPane if-shell -F -t = "­#{a­lte­rna­te_­on}­" "­sen­d-keys -M" "­sel­ect­-pane -t =; copy-mode -e; send-keys -M"
bind-key -T root WheelD­ownPane if-shell -F -t = "­#{a­lte­rna­te_­on}­" "­sen­d-keys -M" "­sel­ect­-pane -t =; send-keys -M"
vim /etc/t­mux.conf - mouse set on

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.