Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
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
Sharing between two different accounts
For different users, you have to set the permissions on the tmux socket so that both users can read and write it. There is only one prerequiste, that there be a group in common between the two users. If such a group does not exist it will be necessary to create one.
In the first terminal, start tmux where shared is the session name and shareds is the name of the socket:
tmux -S /tmp/shareds new -s shared
Then chgrp the socket to a group that both users share in common. In this example, joint is the group that both users share. If there are other users in the group, then they also have access. So it might be recommended that the group have only the two members.
chgrp joint /tmp/shareds
In the second terminal attach using that socket and session.
tmux -S /tmp/shareds attach -t shared
That's it. The session can be made read-only for the second user, but only on a voluntary basis. The decision to work read-only is made when the second user attaches to the session.
tmux -S /tmp/shareds attach -t shared -r
