Skip to content

Commit 81f68e1

Browse files
committed
Cheat Sheet: tmux
1 parent 614c1d7 commit 81f68e1

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

debian/tmux.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Cheat Sheet: tmux
2+
3+
### 🏆 **Basic Commands:**
4+
5+
```bash
6+
tmux new -s abc # Create a new session named "abc"
7+
tmux ls # List all sessions
8+
tmux attach -t abc # Attach to a session
9+
tmux detach # Detach (Ctrl + B, then D also works)
10+
tmux switch-client -t abc # switch to the other session without nesting
11+
tmux kill-session -t abc # Kill a session
12+
tmux kill-server # Kill all sessions
13+
```
14+
15+
---
16+
17+
### ⚙️ **Pane Management:**
18+
19+
| Action | Shortcut |
20+
| ----------------------------------- | ---------------------- |
21+
| **Split vertically (left/right)** | `Ctrl + B``%` |
22+
| **Split horizontally (top/bottom)** | `Ctrl + B``"` |
23+
| **Switch panes** | `Ctrl + B` → Arrow key |
24+
| **Close current pane** | `Ctrl + D` |
25+
| **Resize pane** | `Ctrl + B``:` then: |
26+
| Shrink down | `resize-pane -D 5` |
27+
| Shrink up | `resize-pane -U 5` |
28+
| Shrink left | `resize-pane -L 5` |
29+
| Shrink right | `resize-pane -R 5` |
30+
31+
---
32+
33+
### 🌐 **Window (Tab) Management:**
34+
35+
| Action | Shortcut |
36+
| -------------------- | ---------------- |
37+
| **List windows** | `Ctrl + B``W` |
38+
| **Rename window** | `Ctrl + B``,` |
39+
| **New window (tab)** | `Ctrl + B``C` |
40+
| **Next window** | `Ctrl + B``N` |
41+
| **Previous window** | `Ctrl + B``P` |
42+
| **Close window** | `Ctrl + B``&` |
43+
44+
---
45+
46+
### 📌 **Session Management:**
47+
48+
| Action | Shortcut |
49+
| ----------------------- | ------------------------------------- |
50+
| **Detach from session** | `Ctrl + B``D` |
51+
| **Switch sessions** | `Ctrl + B``S` |
52+
| **Rename session** | `Ctrl + B``$` |
53+
| **Kill session** | `Ctrl + B``:` then: `kill-session` |

0 commit comments

Comments
 (0)