tmux examples, explained
$ tmux new -s work
- tmuxterminal multiplexer — persistent sessions with split panes
- newcreate a new session
- -sname for a new session
- workvalue for -s
$ tmux attach -t work
- tmuxterminal multiplexer — persistent sessions with split panes
- attachattach to an existing session
- -ttarget session or window
- workvalue for -t
$ tmux ls
- tmuxterminal multiplexer — persistent sessions with split panes
- lslist sessions
$ tmux kill-session -t work
- tmuxterminal multiplexer — persistent sessions with split panes
- kill-sessionterminate a single session
- -ttarget session or window
- workvalue for -t
tmux subcommands
new — create a new sessionnew-session — create a new sessionattach — attach to an existing sessionattach-session — attach to an existing sessionls — list sessionslist-sessions — list sessionskill-session — terminate a single sessionkill-server — terminate the tmux server and every sessionrename-session — rename a sessionsplit-window — split the current pane into twodetach — detach the client from its session
tmux flags & options
| -t | target session or window |
| -s | name for a new session |
| -d | start the session detached (or detach other clients) |
| -a | attach to an existing session |
| -L | use this socket name for the server |
| -f | use this alternate config file |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.