tech:todo-memo-tmux
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| tech:todo-memo-tmux [2025/05/24 12:24] – Jean-Baptiste | tech:todo-memo-tmux [2026/06/30 21:44] (Version actuelle) – Jean-Baptiste | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| + | < | ||
| + | {{tag> | ||
| + | |||
| + | # Mémo Tmux | ||
| + | |||
| + | A noter qu'il existe Critmux (tmux + Docker + criu) permettant de geler l' | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | |||
| + | Voir https:// | ||
| + | |||
| + | Équivalent `screen` à **[Ctrl] + [a]** et **l** ((redisplay) | ||
| + | Corrige la taille de la fenêtre | ||
| + | |||
| + | Mémo | ||
| + | |||
| + | **[Ctrl] + b et D** | ||
| + | Déconnecter quelqu' | ||
| + | |||
| + | Ou alors : | ||
| + | |||
| + | ~~~bash | ||
| + | tmux at -d | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Tmux dans un Tmux - changer le raccourci clavier | ||
| + | |||
| + | __Changement du raccourcie Ctrl+b en Ctrl+a__ | ||
| + | |||
| + | ~~~ | ||
| + | Ctrl + b | ||
| + | ~~~ | ||
| + | |||
| + | ~~~ | ||
| + | :set-option -g prefix C-a | ||
| + | ~~~ | ||
| + | |||
| + | ## Taille de la fenêtre petite quand une session est restée attachée | ||
| + | |||
| + | Vous pouvez détachez l' | ||
| + | **[Ctrl] + [b]** puis **[Shift] + [d]** | ||
| + | |||
| + | ~~~ | ||
| + | (0) /dev/pts/0: 0 [119x21 xterm] (utf8) | ||
| + | (1) /dev/pts/6: 0 [170x48 xterm] (utf8) | ||
| + | ~~~ | ||
| + | |||
| + | Puis choisissez la session à fermer, puis **[Entrée]** | ||
| + | |||
| + | ## Changer l' | ||
| + | |||
| + | Rotate window | ||
| + | **[Ctrl] + b** Puis **[Ctrl] + o** | ||
| + | |||
| + | Nnext layout | ||
| + | **[Ctrl] + b** Puis **[Ctrl] + [Space]** | ||
| + | |||
| + | ## Afficher l' | ||
| + | |||
| + | **[Ctrl]] + b** Puis **t** | ||
| + | |||
| + | ## Nommer / renommer les sessions | ||
| + | |||
| + | Créer une nouvelle session nommée | ||
| + | ~~~bash | ||
| + | tmux new -s session-name | ||
| + | ~~~ | ||
| + | |||
| + | **[CTRL]** + **[B]**, **[$]** Pour renommer la session | ||
| + | |||
| + | Pour attacher une session donnée | ||
| + | ~~~bash | ||
| + | tmux a -t session-name | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | **[CTRL]** + **[B]**, **[s]** Pour naviguer entre les sessions \ | ||
| + | ou \ | ||
| + | **[CTRL]** + **[B]**, **[w]** | ||
| + | |||
| + | |||
| + | Renommer une session | ||
| + | ~~~bash | ||
| + | $ tmux ls | ||
| + | $ # tmux rename-session -t old_name new_name | ||
| + | $ tmux rename-session -t 0 new_name | ||
| + | no current client | ||
| + | $ tmux ls | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | Changer la couleur de la bare de status | ||
| + | ~~~ | ||
| + | set -g status-bg grey | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | |||
| + | ## ClusterShell ClusterSSH | ||
| + | |||
| + | ~~~ | ||
| + | setw synchronize-panes on | ||
| + | ~~~ | ||
| + | |||
| + | A tester | ||
| + | `~/ | ||
| + | ~~~ini | ||
| + | bind = set -g synchronize-panes | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ## Pb | ||
| + | |||
| + | ### open terminal failed: not a terminal | ||
| + | |||
| + | ~~~ | ||
| + | $ ssh srv1 -- tmux at -t 1 | ||
| + | open terminal failed: not a terminal | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | #### Solution | ||
| + | |||
| + | Utiliser `ssh -t` | ||
| + | |||
| + | ~~~bash | ||
| + | ssh -t srv1 -- tmux at -t 1 | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### open terminal failed: missing or unsuitable terminal: unknown | ||
| + | |||
| + | ~~~bash | ||
| + | tmux | ||
| + | ~~~ | ||
| + | Erreur | ||
| + | ~~~ | ||
| + | open terminal failed: missing or unsuitable terminal: unknown | ||
| + | ~~~ | ||
| + | |||
| + | Solution | ||
| + | ~~~bash | ||
| + | export TERM=linux | ||
| + | tmux | ||
| + | |||
| + | # A tester : | ||
| + | #export TERM=linux-vt | ||
| + | ~~~ | ||
| + | |||
| + | Voir : / | ||
| + | |||
| + | Voir aussi | ||
| + | |||
| + | ~~~ | ||
| + | Host plop1 | ||
| + | Hostname 192.168.1.20 | ||
| + | SetEnv TERM=linux | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Le pane est renommé automatiquement | ||
| + | |||
| + | #### solution | ||
| + | |||
| + | `~/ | ||
| + | ~~~ | ||
| + | set allow-rename off | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | ### Pb backspace ne fonctionne pas | ||
| + | |||
| + | ~~~ | ||
| + | E558: Terminal entry not found in terminfo | ||
| + | ' | ||
| + | builtin_amiga | ||
| + | builtin_beos-ansi | ||
| + | builtin_ansi | ||
| + | builtin_pcansi | ||
| + | builtin_win32 | ||
| + | builtin_vt320 | ||
| + | builtin_vt52 | ||
| + | builtin_xterm | ||
| + | builtin_iris-ansi | ||
| + | builtin_debug | ||
| + | builtin_dumb | ||
| + | defaulting to ' | ||
| + | ~~~ | ||
| + | |||
| + | |||
| + | #### Solution | ||
| + | |||
| + | ~~~bash | ||
| + | apt-get install ncurses-term | ||
| + | ~~~ | ||
