Tmux
tmux shortcust & cheatsheet¶
Start new:
tmux
start new with session name:
tmux new -s myname
attach
tmux a
tmux at
tmux attach
attach to named
tmux a -t myname
list sessions
tmux ls
kill session
tmux kill-session -t myname
kill all tmux sessions:
tmux ls | grep : | cut -d. -f1 | awk '{print substr($1, 0, length($1)-1)}' | xargs kill
The default <prefix>
is ctrl+b
Sessions:¶
keystroke | command |
---|---|
<prefix> :new |
new session |
<prefix> s |
list sessions |
<prefix> $ |
name session |
Windows:¶
keystroke | command |
---|---|
<prefix> c |
create window |
<prefix> w |
list window |
<prefix> n |
next window |
<prefix> p |
previous window |
<prefix> f |
find window |
<prefix> , |
name window |
<prefix> & |
kill window |
Panes:¶
keystroke | command |
---|---|
<prefix> % |
vertical split |
<prefix> " |
horizontal split |
<prefix> o |
swap panes |
<prefix> q |
show pane numbers |
<prefix> x |
kill pane |
<prefix> + |
break pane into window |
<prefix> - |
restore pane from window |
<prefix> <space> |
toggle between layouts |
<prefix> { |
move current pane left |
<prefix> } |
move current pane right |
<prefix> z |
toggle pane zoom |