Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
| Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
| admin_grundlagen:tmux [2017/02/17 14:59] stefan_miethke | admin_grundlagen:tmux [2024/05/26 04:04] (aktuell) ingo_wichmann | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | // [[tmux_en|page in english]] // | ||
| + | |||
| // tmux ist eine Alternative zu [[screen]] // | // tmux ist eine Alternative zu [[screen]] // | ||
| Zeile 6: | Zeile 8: | ||
| * gemeinsam in einer Shell arbeiten | * gemeinsam in einer Shell arbeiten | ||
| * Eingaben und Befehle in mehreren Shells gleichzeitig absetzen | * Eingaben und Befehle in mehreren Shells gleichzeitig absetzen | ||
| + | * //nicht// auf serielle Schnittstellen zugreifen (Dafür gibt es [[https://packages.debian.org/bookworm/tio|tio]]) | ||
| + | ====== tmux Grundlagen ====== | ||
| ^ Einstieg  ^^ | ^ Einstieg  ^^ | ||
| Zeile 11: | Zeile 15: | ||
| | tmux-Sitzung in den Hintergrund schicken  | ''Strg+b'' ''d'' | | | tmux-Sitzung in den Hintergrund schicken  | ''Strg+b'' ''d'' | | ||
| | tmux-Sitzung in den Vordergrund holen | ''tmux attach'' | | | tmux-Sitzung in den Vordergrund holen | ''tmux attach'' | | ||
| + | | shell beenden  | ''Strg+d'' | | ||
| ^ Sitzungen (sessions)  ^^ | ^ Sitzungen (sessions)  ^^ | ||
| | Benannte Sitzung ''sitzung1'' starten  | ''tmux new -s sitzung1'' | | | Benannte Sitzung ''sitzung1'' starten  | ''tmux new -s sitzung1'' | | ||
| Zeile 19: | Zeile 24: | ||
| | zum nächsten Fenster wechseln  | ''Strg+b'' ''n'' | | | zum nächsten Fenster wechseln  | ''Strg+b'' ''n'' | | ||
| | zum vorherigen Fenster wechseln  | ''Strg+b'' ''p'' | | | zum vorherigen Fenster wechseln  | ''Strg+b'' ''p'' | | ||
| + | | Aktuelles Fenster benennen  | ''Strg+b'' '','' | | ||
| | Fenster auflisten  | ''Strg+b'' ''w'' | | | Fenster auflisten  | ''Strg+b'' ''w'' | | ||
| | zum 4. Fenster springen  | ''Strg+b'' ''4'' ([0..9])  | | | zum 4. Fenster springen  | ''Strg+b'' ''4'' ([0..9])  | | ||
| Zeile 24: | Zeile 30: | ||
| | Horizontal teilen  | ''Strg+b'' ''%%"%%'' | | | Horizontal teilen  | ''Strg+b'' ''%%"%%'' | | ||
| | Vertikal teilen  | ''Strg+b'' ''%'' | | | Vertikal teilen  | ''Strg+b'' ''%'' | | ||
| - | | zu anderem pane wechseln  | ''Strg+b'' ''<Cursor>'' | | + | | zu anderem pane wechseln  | ''Strg+b'' ''<Pfeil>'' | | 
| | aktuelles pane entfernen  | ''Strg+b'' ''x'' | | | aktuelles pane entfernen  | ''Strg+b'' ''x'' | | ||
| - | | Größe des aktuellen panes ändern  | ''Strg+b'' ''Strg+<Cursor>'' | | + | | Größe des aktuellen panes ändern  | ''Strg+b'' ''Strg+<Pfeil>'' | | 
| | aktuelles pane zu Vollbild und zurück (Zoom)  | ''Strg+b'' ''z''  | | | aktuelles pane zu Vollbild und zurück (Zoom)  | ''Strg+b'' ''z''  | | ||
| | alle panes vertikal gleich groß anordnen  | ''Strg+b'' ''Alt+2'' bzw.''Strg+b'' ''ESC'' ''2'' | | | alle panes vertikal gleich groß anordnen  | ''Strg+b'' ''Alt+2'' bzw.''Strg+b'' ''ESC'' ''2'' | | ||
| | alle panes horizontal gleich groß anordnen  | ''Strg+b'' ''Alt+1'' bzw.''Strg+b'' ''ESC'' ''1'' | | | alle panes horizontal gleich groß anordnen  | ''Strg+b'' ''Alt+1'' bzw.''Strg+b'' ''ESC'' ''1'' | | ||
| ^ scrollen  ^^ | ^ scrollen  ^^ | ||
| - | | tmux Scrolling  | ''Strg+[''  | | + | | nach oben scrollen  | ''Strg+b'' ''Bild auf'' | | 
| - | | ausschalten  | ''Strg+C''  | | + | | tmux Scrolling einschalten  | ''Strg+b [''  | | 
| + | | tmux Scrolling ausschalten  | ''Strg+c''  | | ||
| - | ====== scrollen ====== | + | ===== Distributed shell ===== | 
| + | Eingabe in alle Fenster leiten: | ||
| + | * ''<Strg>+b'' | ||
| + | |||
| + | :set synchronize-panes | ||
| + | wieder ausschalten: | ||
| + | :set synchronize-panes off | ||
| + | |||
| + | ====== Konfigurationsmöglichkeiten ====== | ||
| + | ===== scrollen ===== | ||
| In tmux wieder "ganz normal" mit ''Shift+<BildAuf>'' scrollen: | In tmux wieder "ganz normal" mit ''Shift+<BildAuf>'' scrollen: | ||
| <file raw /etc/tmux.conf> | <file raw /etc/tmux.conf> | ||
| Zeile 41: | Zeile 57: | ||
| </file> | </file> | ||
| - | ====== Distributed shell ====== | + | ===== Mausunterstützung ===== | 
| - | alle Fenster miteinander verbinden: | + | In tmux per Maus scrollen, Panes wechseln, etc.: | 
| - | * ''<Strg>+b'' | + | <file raw ~/.tmux.conf> | 
| - | :set synchronized-panes | + | # mouse support | 
| - | :set synchronized-panes off | + | set -g mouse on | 
| + | </file> | ||
| - | ====== ''Strg+a'' statt ''Strg+b'' ====== | + | ===== Reloading tmux config ===== | 
| + | If you have made changes to your tmux configuration file in the ~/.tmux.conf file, | ||
| + | it shouldn’t be necessary to start the server up again from scratch with kill-server. | ||
| + | Instead, you can prompt the current tmux session to reload the configuration with the source-file command. | ||
| + | |||
| + | This can be done either from within tmux, by pressing Ctrl+B and then : to bring up a command prompt, and typing: | ||
| + | |||
| + | <file> | ||
| + | :source-file ~/.tmux.conf | ||
| + | </file> | ||
| + | |||
| + | Or simply from a shell: | ||
| + | |||
| + | <file> | ||
| + | $ tmux source-file ~/.tmux.conf | ||
| + | </file> | ||
| + | |||
| + | This should apply your changes to the running tmux server without affecting the sessions or windows within them. | ||
| + | |||
| + | ===== vi-like key-bindings für copy-mode ===== | ||
| + | <file> | ||
| + | :setw -g mode-keys vi | ||
| + | </file> | ||
| + | ===== in die Dokumentation kopieren ===== | ||
| + | <file> | ||
| + | :set -s copy-command 'cat >> ~/doku' | ||
| + | </file> | ||
| + | ===== ''Strg+a'' statt ''Strg+b'' ===== | ||
| <file> | <file> | ||
| # Strg+a statt Strg+b | # Strg+a statt Strg+b | ||
| Zeile 58: | Zeile 102: | ||
| * https://gist.github.com/MohamedAlaa/2961058 | * https://gist.github.com/MohamedAlaa/2961058 | ||
| * http://man.openbsd.org/OpenBSD-current/man1/tmux.1 | * http://man.openbsd.org/OpenBSD-current/man1/tmux.1 | ||
| + | * https://github.com/tmuxinator/tmuxinator | ||