# tmux Workflow Cheatsheet > A practical guide for starting sessions, splitting panes, navigating windows, and keeping long-running terminal work organized instead of chaotic. Most shortcuts start with the prefix `Ctrl-b`. Press the prefix first, then the next key. Source: https://tmux.cobanov.dev/ Part of the cobanov.dev cheatsheet set. Companions: https://git.cobanov.dev/llms.txt, https://vim.cobanov.dev/llms.txt Mental model: sessions hold projects, windows group tasks, panes split focus. ## 01. Create, list, attach, and kill sessions This is the tmux backbone when you want work to survive terminal restarts. ``` tmux new -s work tmux ls tmux attach -t work tmux kill-session -t work ``` ## 02. Leave a session running and come back later Detach now, then reattach from another terminal or after a reboot. ``` Ctrl-b d tmux attach -t work ``` ## 03. Open and navigate windows Think of windows as task groups inside the same session. ``` Ctrl-b c # create window Ctrl-b n # next window Ctrl-b p # previous window Ctrl-b , # rename window Ctrl-b 0..9 # jump to window N ``` ## 04. Split the terminal into panes Use panes when you want logs, editor, and shell visible at the same time. ``` Ctrl-b % # split vertically Ctrl-b " # split horizontally Ctrl-b arrow-key # move between panes Ctrl-b x # close current pane ``` ## 05. Resize panes and zoom the one you care about Good for temporarily promoting one pane without losing the grid. ``` Ctrl-b Alt-Left Ctrl-b Alt-Right Ctrl-b Alt-Up Ctrl-b Alt-Down Ctrl-b z # toggle zoom on current pane ``` ## 06. Scroll, search, and copy from history Enter copy mode when the output is already off-screen. ``` Ctrl-b [ # enter copy mode /text # search forward n # next match Space # start selection Enter # copy selection ``` ## 07. Jump around windows and sessions visually These pickers help when you have several things running at once. ``` Ctrl-b w # window picker Ctrl-b s # session picker Ctrl-b $ # rename session ``` ## 08. Send the same command to every pane Very handy when you intentionally need mirrored commands in multiple panes. ``` Ctrl-b :setw synchronize-panes on # type once, every pane receives it Ctrl-b :setw synchronize-panes off ``` ## 09. Swap panes or reorganize the current layout Useful after a split order that felt right at first but no longer does. ``` Ctrl-b o # cycle through panes Ctrl-b Space # cycle layouts Ctrl-b { # swap with previous Ctrl-b } # swap with next ``` ## 10. Rename sessions and windows so they stay readable A named tmux setup is much easier to return to later. ``` Ctrl-b , Ctrl-b $ tmux rename-session -t work api ``` ## 11. Reload tmux config after editing it No need to restart tmux just to test a mapping or setting change. ``` tmux source-file ~/.tmux.conf ``` ## 12. Close the current pane, window, or whole session Choose the smallest thing to close so you do not accidentally kill unrelated work. ``` exit Ctrl-b & # kill current window tmux kill-session -t work ``` ## Rules of thumb - prefix first, then the command - sessions hold projects · windows group tasks · panes split focus