Tmux Cheat Sheet - 快速参考指南,收录常用语法、命令与实践。
Start a new session
$ tmux
Start a new named session
$ tmux new -s myname
Show all sessions
$ tmux ls
Attach to last session
$ tmux a
Attach to named
$ tmux a -t myname
Kill a session by name
$ tmux kill-ses -t myname
Kill sessions but the current
$ tmux kill-ses -a
Kill sessions but 'myname'
$ tmux kill-ses -a -t myname
$ tmux info
Reload config
$ tmux source-file ~/.tmux.conf
Show config
$ tmux show-options -g
| Command | Description |
|---|---|
Ctrl+b [ | Enter copy mode |
<Space> | Start selection |
Enter | Copy selection |
q | Quit copy mode |
Ctrl+b ] | Paste contents of buffer_0 |
For tmux version 3.5a on MacOS 15.3.1 Sequoia 'Copy Mode' functions lil bit differently Below I've written the
differences | Command | Description | | ------------ | -------------------------- | | Ctrl + <Space> | Start selection
| | Ctrl + w | Copy selection |
{.shortcuts}
Mainly works like selecting text in Vim
| Shortcuts | Description |
|---|---|
Ctrl+b ? | List all shortcuts |
{.shortcuts .show-header}
<br/>Show every session, window, pane, etc.
$ tmux info
| Shortcuts | Description |
|---|---|
Ctrl+b " / % | Split Horiz/Vert |
Ctrl+b ! | Pane -> Window |
Ctrl+b x | Kill pane |
Ctrl+b <Arrow> | Navigate panes |
Ctrl+b <Space> | Toggle layouts |
Ctrl+b { / } | Move to Left/Right |
Ctrl+b o | Go to next panes |
Ctrl+b z | Toggle full-screen |
Ctrl+b ; | Toggle Last pane |
Ctrl+b q | Show numbers |
Ctrl+b q 0...9 | Go to # pane |
{.shortcuts}
| - | - |
|---|---|
Ctrl+b c | Create window |
Ctrl+b p / n | Previous/Next window |
Ctrl+b " / % | Split Horiz/Vert |
Ctrl+b w | List window |
Ctrl+b , | Rename window |
Ctrl+b f | Find window |
Ctrl+b l | Last window |
Ctrl+b . | Move window |
Ctrl+b & | Close window |
Ctrl+b 0...9 | Go to # window |
{.shortcuts}
| - | - |
|---|---|
Ctrl+b d | <red>Detach from session</red> |
Ctrl+b s | Show all sessions |
Ctrl+b $ | Rename session |
Ctrl+b ( / ) | Previous/Next session |
{.shortcuts}
| Command | Description |
|---|---|
Ctrl+b : | Enter command mode |
{.shortcuts}
| Command | Description |
|---|---|
resize-pane -D 20 | Resize down |
resize-pane -U 20 | Resize up |
resize-pane -L 20 | Resize left |
resize-pane -R 20 | Resize right |
| Command | Description |
|---|---|
list-keys | All commands |
list-panes | All panes |
list-windows | All Windows |
| Command | Description |
|---|---|
list-buffers | List all buffers |
show-buffer | Show #0 contents |
capture-pane | Copy of pane |
choose-buffer | Show and paste |
save-buffer a.txt | Save to file |
delete-buffer -b 1 | Delete buffer 1 |
| Command | Description |
|---|---|
set -g OPTION | Set for all sessions |
setw -g OPTION | Set for all windows |
setw -g mode-keys vi | Enable vi-mode |
set -g prefix C-a | Set prefix |
| Command | Description |
|---|---|
swap-pane -s 3 -t 1 | Swap pane |
swap-window -t -1 | Move to left |
setw synchronize-panes | Sync Panes |
join-pane -t :# | Join pane |
地址
Level 10b, 144 Edward Street, Brisbane CBD(Headquarter)Level 2, 171 La Trobe St, Melbourne VIC 3000四川省成都市武侯区桂溪街道天府大道中段500号D5东方希望天祥广场B座45A13号Business Hub, 155 Waymouth St, Adelaide SA 5000Disclaimer
JR Academy acknowledges Traditional Owners of Country throughout Australia and recognises the continuing connection to lands, waters and communities. We pay our respect to Aboriginal and Torres Strait Islander cultures; and to Elders past and present. Aboriginal and Torres Strait Islander peoples should be aware that this website may contain images or names of people who have since passed away.
匠人学院网站上的所有内容,包括课程材料、徽标和匠人学院网站上提供的信息,均受澳大利亚政府知识产权法的保护。严禁未经授权使用、销售、分发、复制或修改。违规行为可能会导致法律诉讼。通过访问我们的网站,您同意尊重我们的知识产权。 JR Academy Pty Ltd 保留所有权利,包括专利、商标和版权。任何侵权行为都将受到法律追究。查看用户协议
© 2017-2025 JR Academy Pty Ltd. All rights reserved.
ABN 26621887572