tmux is a terminal multiplexer that allows easily running multiple applications in the same terminal and keeping everything as a detached process.
What I do is I simply have
tmux starting command in
.bashrc. This has added benefit that most IDEs that offer terminals will also start
# automagical tmux if not already in a tmux session if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then tmux attach-session -t default || tmux new-session -s default fi
tmux is especially useful when connecting to remote hosts and want to keep tabs.
You start, attach to and detach from
tmux sessions. A single machine can have many
tmux sessions running.
Sessions (current session shown bottom left in [brackets]) > Windows (windows are shown in bottom bar, current marked with *) > Panes (tiled sections of a window, active highlighted with green borders)
I use 100% vanilla
tmux keybindigs for easier cross-system usage.
ctrl+b, cCreate a new window with a single pane.
ctrl+b, 0-9Jump to a specific window.
ctrl+b, "Split pane horizontally.
ctrl+b, %Split pane vertically.
ctrl+b, arrowsSelect another pane.
ctrl+b, ctrl+arrowsResize selected pane.
ctrl+b, zMaximize/normalize selected pane.
ctrl+b, !Move current pane to a new dedicated window.
ctrl+b, xClose the current window.
ctrl+dEnd of Transmission -signal like normal, closes active pane.
ctrl+b, dDetach from the session, leaving it running in the background.
tmux aAttach back to detached
ctrl+b, [Enter copy mode for copy-paste, browsing and such.
ctrl+b, [, ctrl+sSearch in terminal,
ctrl+b, [, arrows, ctrl+space, arrows, alt+wCopy to
ctrl+b, ]Paste from