Where to start First steps track · 15 stages
Linux Labs

tmux — terminal multiplexer

cheat sheet · tmux 3.x https://lab.dimsanych.ru/en/wiki/tmux/

Cheat sheet

  • tmux new -s name new named session
  • tmux ls list sessions
  • tmux attach -t name attach to a session
  • tmux kill-session -t name kill a session
  • Ctrl+b d detach — the session keeps running
  • Ctrl+b c new window

Options

Ctrl+b [         enter copy-mode → arrows/PgUp to scroll; q to exit
                 (in copy-mode: Space to start a selection, Enter to copy)
Ctrl+b ]         paste what was copied

~/.tmux.conf (common settings):

set -g mouse on              # mouse: selection, pane resize, scroll
set -g history-limit 10000   # scrollback length
setw -g mode-keys vi         # vi navigation in copy-mode

From a script: tmux new -d -s job 'long-cmd' (run in the background), tmux send-keys -t job 'cmd' Enter.

Loading…