This commit is contained in:
Wilfried OLLIVIER 2019-07-07 15:28:43 +02:00
parent df511c8940
commit 2238814e3c
2 changed files with 31 additions and 0 deletions

View file

@ -25,3 +25,4 @@
- [Docker](./ops/tools/docker.md) - [Docker](./ops/tools/docker.md)
- [MongoDB](./ops/tools/mongodb.md) - [MongoDB](./ops/tools/mongodb.md)
- [OpenSSL](./ops/tools/openssl.md) - [OpenSSL](./ops/tools/openssl.md)
- [Tmux](./ops/tools/tmux.md)

30
src/ops/tools/tmux.md Normal file
View file

@ -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