Benutzer-Werkzeuge

Webseiten-Werkzeuge


linux:tmux

tmux

Meine ~/.tmux.conf.

Session Management

Auflisten aller aktuell laufenden tmux-Sitzungen:

tmux ls 

Neue tmux-Sitzung mit dem Namen „hans“ starten:

tmux new -s hans 

Verbinden zur bestehenden Sitzung mit dem Namen „hans“:

tmux attach -t hans 

Beendet tmux-Server und -Clients und zerstört alle Sitzungen:

tmux kill-server

Windows

Neues Fenster

tmux new-window (prefix + c)

Zum Fenster mit dem Index

tmux select-window -t :0-9 (prefix + 0-9)

Neuer Name für das Fenster

tmux rename-window (prefix + ,)

Panes

2 vertikale Panes

tmux split-window (prefix + “)

2 horizontale panes

tmux split-window -h (prefix + %)

swaps pane with another in the specified direction

tmux swap-pane -[UDLR] (prefix + { or })

Wähle das nächste Pane aus in der angegebenen Richtung

tmux select-pane -[UDLR]

Wähle das nächste Pane aus in der numerischen Reihenfolge

tmux select-pane -t :.+

Hilfreiche Befehle

Listet alle Tasten und das Kommando

tmux list-keys

Listed die Befehle

tmux list-commands

Listet alle Sessions, Fenster, Panes, usw.

tmux info

tmux-Konf neu laden (based on a default tmux config)

tmux source-file ~/.tmux.conf

Kürzel

Info

In tmux, hit the prefix ctrl+b

:new<CR>  new session
s  list sessions
$  name session

Windows (tabs)

c  create window
w  list windows
n  next window
p  previous window
f  find window
,  name window
&  kill window

Panes (splits)

%  vertical split
"  horizontal split

o  swap panes
q  show pane numbers
x  kill pane
+  break pane into window (e.g. to select text by mouse to copy)
-  restore pane from window
⍽  space - toggle between layouts
<prefix> q (Show pane numbers, when the numbers show up type the key to goto that pane)
<prefix> { (Move the current pane left)
<prefix> } (Move the current pane right)
<prefix> z toggle pane zoom
<prefix> alt-Pfeiltasten Pane vergrößern/verkleinern

Sharing Terminal-Sessions zwischen 2 verschiedenen Accounts

Für unterschiedliche Benutzer erstellen wir einenen tmux-Socket, der die Gruppenrechte beider User enthält (ggf. muss die Gruppe vorher erzeugt werden).

Zuerst tmux mit dem Socket starten:

tmux -S /tmp/shareds new -s shared

Dann den Socket chgrp-en:

chgrp joint /tmp/shareds

Nun kann sich der andere User verbinden:

tmux -S /tmp/shareds attach -t shared

Es geht auch read-only:

tmux -S /tmp/shareds attach -t shared -r

Siehe auch

linux/tmux.txt · Zuletzt geändert: von move

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki