Getting Started with tmux
Source: Dev.to
Introduction
An introduction to tmux, a terminal multiplexer.
Session Management
Start tmux
tmux # or tmux new-sessionCreate a new session within a session
prefix + :newList sessions
tmux lsDetach from a session (exit tmux)
prefix + dAttach to a session
tmux attach # or tmux aAttach to a specific session
tmux attach -t 0 # or tmux a -tDelete a session
tmux kill-sessionDelete a specific session
tmux kill-session -t 0Delete all sessions
tmux kill-serverRename a session
prefix + $
Window Management
Create a new window
prefix + cSwitch to the next window
prefix + nSwitch to the previous window
prefix + pSwitch to a specific window
prefix + 0(replace 0 with the window number)List windows
prefix + wDelete a window
prefix + &
Pane Management
Delete a pane
prefix + xSwap panes (forward)
prefix + {Swap panes (backward)
prefix + }
Copy Mode
Enter copy mode
prefix + [Select copy range (in copy mode)
vorSpaceCopy (in copy mode)
yorEnter
macOS Terminal Note
When using tmux in macOS Terminal, you cannot copy text by selecting it with the mouse (⌘+C) because tmux uses vim‑like shortcuts. To copy the selected range with the mouse, toggle the Terminal’s Allow mouse reporting setting with ⌘+R.
Configuration
The article references a tmux configuration repository:
github - bmf-san/dotfiles