The problem
You need to manage multiple terminal sessions and preserve work across disconnections.
The solution
# Start new tmux session
tmux new -s session_name
# Detach from session (Ctrl+b d)
tmux detach
# List sessions
tmux ls
# Attach to existing session
tmux attach -t session_name
# Kill session
tmux kill-session -t session_name
# Split pane horizontally (Ctrl+b ")
tmux split-window
# Split pane vertically (Ctrl+b %)
tmux split-window -h
# Navigate panes (Ctrl+b arrow keys)
tmux select-pane -U # Up
tmux select-pane -D # Down
# Create new window (Ctrl+b c)
tmux new-window
# Rename window (Ctrl+b ,)
tmux rename-window new_namePut it to work
# Start development session
tmux new -s dev
# Split for code editor and server
# Ctrl+b " for horizontal split
# Ctrl+b % for vertical split
# Detach and reconnect later
tmux attach -t devWorth knowing
Tmux sessions persist even when disconnected. Use prefix key (Ctrl+b) before commands.