30 lines
643 B
Markdown
30 lines
643 B
Markdown
# 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
|