Back
4/65
Lesson 4
7 min
tmux Basics
Keep your work running when you disconnect
Ready to level up?
Mark complete to track your learning progress.
Keep your work running when you disconnect
Mark complete to track your learning progress.
Never lose work when SSH drops.
tmux is a terminal multiplexer. It lets you:
Click panes to select them, then use the buttons to split or close. This simulates what Ctrl+a shortcuts do in a real tmux session.
tmux new -s myproject
This creates a session named "myproject".
Your session continues running in the background!
tmux ls
See all running sessions.
tmux attach -t myproject# Or just:tmux a
Attaches to the most recent session.
Ctrl+a (not the default Ctrl+b). All tmux commands start with the prefix.1# Create a session2$ tmux new -s practice34# Split the screen5# Press Ctrl+a, then |67# Move to the new pane8# Press Ctrl+a, then l910# Run something11$ ls -la1213# Detach14# Press Ctrl+a, then d1516# Verify it's still running17$ tmux ls1819# Reattach20$ tmux attach -t practice
Your coding agents (Claude, Codex, Antigravity) run in tmux panes. If SSH drops, they keep running. When you reconnect and reattach, they're still there!