使用

1
2
3
4
5
6
7
8
9
10
11
12
# 启动
tmux
# 启动并设置 session 名称
tmux new -s {session-name}
# attach
tmux a # or at, or attach
# attach by session name
tmux a -t {session-name}
# 列出 session
tmux ls
# 清理 session
tmux kill-session -t {session-name}

快捷键

1
2
# active command mode
ctrl + b

Pane

1
2
3
4
5
6
7
8
9
"   splite vertical
% splite horizon
q show pane numbers
o change focued pane
ctrl+o swap panes
[space] 切换布局

x close panel (or exit)
arrow change panel

Session

1
2
3
$  rename session
s list session
d detach (keep session alive)

Window

1
2
3
4
5
6
7
c		create
& close
n next
p previous
w list windows
f find windows
, name windows

拷贝模式

1
2
3
4
5
6
7
# active command mode
ctrl + b

# command
[ 开启拷贝模式, 可以滚动屏幕
q 退出拷贝模式
[Esc] 退出拷贝模式

调整大小

1
2
3
4
5
# 1. 启用 command mode 
ctrl + b

# 2. 调整大小
{滚轮} 调整上下分屏 Pane 的大小