brain/src/ops/tools/tmux.md

643 B

Tmux

El famoso terminal multiplexer (sorry not sorry but screen is a piece of shit).

Sync panels

Sync panels can be quite usefull to do the same tasks on a different set of servers.

tmux.conf file

[...]
unbind S
bind S set-windows-option synchronize-panes
[...]

How to use it

Typical use case can be updating let's say 3 Debian servers.

  1. start tmux
  2. split in 3, use ssh to connect to the targets1.
  3. use bind prefix + S to activate sync2
  4. apt update && apt upgrade
  5. And voilà !

  1. a dedicated session can be used to automate stuff, more on that later... ↩︎

  2. by default, Ctrl + b ↩︎