From a90c521b779fae89bbee0d1e71f2a249106b1a70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Sun, 12 Feb 2023 18:03:41 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=AA=93=20Split=20tmux=20instructions=20ac?= =?UTF-8?q?ross=20two=20slides?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slides/shared/connecting.md | 44 +++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/slides/shared/connecting.md b/slides/shared/connecting.md index 9fe5eda9..cb1b12c7 100644 --- a/slides/shared/connecting.md +++ b/slides/shared/connecting.md @@ -149,7 +149,7 @@ You are welcome to use the method that you feel the most comfortable with. --- -## Tmux cheat sheet +## Tmux cheat sheet (basic) [Tmux](https://en.wikipedia.org/wiki/Tmux) is a terminal multiplexer like `screen`. @@ -159,15 +159,35 @@ But some of us like to use it to switch between terminals.
It has been preinstalled on your workshop nodes.* -- Ctrl-b c → creates a new window -- Ctrl-b n → go to next window -- Ctrl-b p → go to previous window -- Ctrl-b " → split window top/bottom -- Ctrl-b % → split window left/right -- Ctrl-b Alt-1 → rearrange windows in columns -- Ctrl-b Alt-2 → rearrange windows in rows -- Ctrl-b arrows → navigate to other windows -- Ctrl-b , → rename window -- Ctrl-b Ctrl-o → cycle pane position (e.g. switch top/bottom) +- You can start a new session with `tmux` +
+ (or resume or share an existing session with `tmux attach`) + +- Then use these keyboard shortcuts: + + - Ctrl-b c → creates a new window + - Ctrl-b n → go to next window + - Ctrl-b p → go to previous window + - Ctrl-b " → split window top/bottom + - Ctrl-b % → split window left/right + - Ctrl-b arrows → navigate within split windows + +--- + +## Tmux cheat sheet (advanced) + - Ctrl-b d → detach session -- tmux attach → re-attach to session +
+ (resume it later with `tmux attach`) + +- Ctrl-b Alt-1 → rearrange windows in columns + +- Ctrl-b Alt-2 → rearrange windows in rows + +- Ctrl-b , → rename window + +- Ctrl-b Ctrl-o → cycle pane position (e.g. switch top/bottom) + +- Ctrl-b PageUp → enter scrollback mode +
+ (use PageUp/PageDown to scroll; Ctrl-c or Enter to exit scrollback)