Create and Reattach tmux Sessions
Run work inside a terminal multiplexer so SSH dropouts, laptop sleeps, and closed windows never kill your running jobs.
01Command
$ tmux new -s work # create session 'work'
tmux attach -t work # reattach later (even from another SSH login)
# inside tmux: Ctrl-b d detach, Ctrl-b % split pane, Ctrl-b d then exit02What it does
tmux keeps a server-side session alive after the client disconnects, so an overnight build or vim session survives a dropped VPN. All commands go through the prefix key Ctrl-b followed by a letter: d detaches, % and " split panes vertically and horizontally, and the session list is one tmux ls away. tmux attach -t work reconnects to exactly where you left off, from any machine that can reach the host.
03Risk
04Undo
$ tmux kill-session -t work05Sources
- tmux(1) — Linux man pageEvidence: tmux man page: 'tmux is a terminal multiplexer' documenting new-session, attach-session, and detach-client.
- Arch Wiki: tmuxEvidence: Practical guide to sessions, prefix key bindings (Ctrl-b), pane splitting, and reattaching after SSH disconnects.
Last verified: 2026-09-17 · Category: Developer
06Related solutions
Refresh the package index from all configured repositories, then install newer versions of every upgradable package.
Find every occurrence of a pattern across all files in a tree, printed as file:line:number matches.
Unpack a gzipped tarball into the current directory while printing each file as it is extracted.