🚀 Ultimate Tmux Cheat Sheet

🔌 Session Management

# Starting & Ending
tmux                  → Start new session
tmux new -s name      → Start new named session
Ctrl+b d             → Detach from session
tmux new -A -s hetzner -> Creates and attach a session
exit                 → Kill session

# Reconnecting
tmux ls              → List all sessions
tmux a              → Attach to last session
tmux a -t name      → Attach to named session

🪟 Window Wizardry

# Pane Splitting
Ctrl+b "            → Split horizontally ⬆️⬇️
Ctrl+b %            → Split vertically ⬅️➡️

# Pane Navigation
Ctrl+b + arrows     → Move between panes
Ctrl+b o           → Toggle between panes
Ctrl+b x           → Close current pane
Ctrl+b z           → Zoom/unzoom pane

📏 Resize Like a Pro

# Manual Resizing
Ctrl+b Ctrl+arrows  → Resize current pane
Ctrl+b Alt+arrows   → Fine-tune resize

# Quick Layouts
Ctrl+b Alt+1       → Even horizontal split
Ctrl+b Alt+2       → Even vertical split
Ctrl+b Alt+5       → Tiled layout

🎯 Pro Tips

  1. Always remember Ctrl+b is your prefix key
  2. Use tmux ls when lost
  3. Name your sessions for easy management
  4. Detach (don't exit) to keep sessions running

🚨 Emergency Commands

tmux kill-server    → Nuclear option (kills everything)
tmux kill-session -t name → Kill specific session


Remember: Practice makes perfect! Start with basic commands and gradually incorporate more advanced ones into your workflow. 🎮