root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat tmux.md
// Shells & Pivoting

tmux

22 Jul 2026 · 2 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.

TypeCLI
PlatformKali / Linux / macOS
tmux cheat sheet

Splitting the screen

tmux   # enter a session
ActionShortcut
Split vertically (side by side)Ctrl+b %
Split horizontally (top/bottom)Ctrl+b "
Move between panesCtrl+b + arrows
Resize a paneCtrl+b, hold Ctrl + arrows
Maximise a paneCtrl+b z
Close a paneexit or Ctrl+d

Sessions

ActionCommand
Create a sessiontmux
Create a named sessiontmux new -s name
List sessionstmux ls
Attach to a sessiontmux attach -t name
Detach without closingCtrl+b, then d

Windows

ActionShortcut
New windowCtrl+b, then c
Switch windowCtrl+b, then number 0-9
Rename windowCtrl+b, then ,

Other useful ones

ActionShortcut
Copy (copy mode)Ctrl+b [
PasteCtrl+b ]
Show clockCtrl+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.