From 2238814e3cfd78f783f39b707c77dcebca2b26be Mon Sep 17 00:00:00 2001 From: Wilfried OLLIVIER Date: Sun, 7 Jul 2019 15:28:43 +0200 Subject: [PATCH] Add tmux --- src/SUMMARY.md | 1 + src/ops/tools/tmux.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 src/ops/tools/tmux.md diff --git a/src/SUMMARY.md b/src/SUMMARY.md index f9e2a5e..c25a48e 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -25,3 +25,4 @@ - [Docker](./ops/tools/docker.md) - [MongoDB](./ops/tools/mongodb.md) - [OpenSSL](./ops/tools/openssl.md) + - [Tmux](./ops/tools/tmux.md) diff --git a/src/ops/tools/tmux.md b/src/ops/tools/tmux.md new file mode 100644 index 0000000..2410459 --- /dev/null +++ b/src/ops/tools/tmux.md @@ -0,0 +1,30 @@ +# 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 + +```conf +[...] +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 +1. split in 3, use ssh to connect to the targets[^1]. +1. use `bind prefix + S` to activate sync[^2] +1. `apt update && apt upgrade` +1. And voilĂ  ! + +[^1]: a dedicated session can be used to automate stuff, more on that later... + +[^2]: by default, Ctrl + b