Posts tagged ‘tmux’

Mehr Power im Terminal mit tmux – Teil 1

This entry is part 1 of 3 in the series tmux

In den letzten Tagen habe ich mich ein wenig mit tmux beschäftigt, einem Terminal-Multiplexer für Linux und Unix, der aber auch im Windows-Subsystem für Linux funktioniert.

Was ist ein Terminal-Multiplexer? Die englische Wikipedia [1] schreibt dazu folgendes:

„tmux is a terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time. It can also be used to detach processes from their controlling terminals, allowing SSH sessions to remain active without being visible.“

Also:

  • man kann mehrere Terminal-Sessions gleichzeitig in einem Fenster offen haben, bricht die Verbindung ab
  • bricht die SSH-Verbindung ab, so bleibt die Session trotzdem erhalten

Die Installation war recht einfach, per apt install tmux holt man sich das Paket auf die Maschine. Um bei jedem Login tmux sofort zur Verfügung zu haben, habe ich gemäß [2] folgendes der ~/.profile hinzugefügt:

if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
    tmux attach -t default || tmux new -s default
fi

Startet man jetzt tmux, so erhält man den folgenden Bildschirm:

Im nächsten Teil schauen wir uns dann die grundlegende Bedienung an.

[1] https://en.wikipedia.org/wiki/Tmux
[2] https://www.tecmint.com/tips-for-tmux-terminal-sessions/

Uwe

Uwe Ziegenhagen likes LaTeX and Python, sometimes even combined. Do you like my content and would like to thank me for it? Consider making a small donation to my local fablab, the Dingfabrik Köln. Details on how to donate can be found here Spenden für die Dingfabrik.

More Posts - Website