root@sparrow:~/writeups$ cat tmux.md
// Shells & Pivoting
tmux
22 Jul 2026
ยท 1 min read
tmux is a terminal multiplexer: it lets you have several terminals on one screen (panes), and keep sessions alive even if the SSH connection drops. Essential for running several tools in parallel during a CTF or engagement.
| Type | CLI |
| Platform | Kali / Linux / macOS |

Splitting the screen
tmux # enter a session
| Action | Shortcut |
|---|---|
| Split vertically (side by side) | Ctrl+b % |
| Split horizontally (top/bottom) | Ctrl+b " |
| Move between panes | Ctrl+b + arrows |
| Resize a pane | Ctrl+b, hold Ctrl + arrows |
| Maximise a pane | Ctrl+b z |
| Close a pane | exit or Ctrl+d |
Sessions
| Action | Command |
|---|---|
| Create a session | tmux |
| Create a named session | tmux new -s name |
| List sessions | tmux ls |
| Attach to a session | tmux attach -t name |
| Detach without closing | Ctrl+b, then d |
Windows
| Action | Shortcut |
|---|---|
| New window | Ctrl+b, then c |
| Switch window | Ctrl+b, then number 0-9 |
| Rename window | Ctrl+b, then , |
Other useful ones
| Action | Shortcut |
|---|---|
| Copy (copy mode) | Ctrl+b [ |
| Paste | Ctrl+b ] |
| Show clock | Ctrl+b t |
Responsible use
These commands are for systems you own or have explicit written authorisation to test (labs, CTFs, contracted engagements). Using them against third-party infrastructure without permission is illegal in most countries.