ELUG Meetup: 22 August 2024

Topic: tmux
Discussion lead: Robert, and then everyone
Physical location: Strathcona County Public Library, Maple Room; 401 Festival Lane Sherwood Park https://maps.app.goo.gl/yhBzVWn4UoVTGW1T7

tmux is a “terminal multiplexer”, essentially a terminal manager for creating and managing multiple terminal windows within a single environment.

tmux isolates terminals from connection dependencies because the (tmux) terminal process is now on the
remote machine, not on your local machine, i.e. terminal processes can continue running on the remote machine even if your connection to the remote machine is lost.

Usage:

tmux

By default, tmux creates a new “session” = the environment that contains one or more terminals, and creates one terminal in the new session

  • Multiple terminals/windows/tabs can be started within each session
  • You can manage how the multiple running terminals are arranged on your screen
  • Each terminal can be used for a different purpose (connect to another machine, do a task locally,
    compile and run a donut-shaped program that displays a spinning ascii-art donut, etc…)
  • You can replicate processes between terminals, e.g. type a command into multiple terminals at the same time
  • Each terminal state can be saved, e.g. when it is no longer needed
  • If you disconnect from the session, the session continues running (because tmux is still running)
  • If you disconnect your ssh connection, the session continues running (because tmux is still running on
    the remote machine)
  • You can reconnect ssh and reconnect to an existing tmux session at any time

Resources:

https://tmuxcheatsheet.com/
https://www.hostinger.com/tutorials/tmux-beginners-guide-and-cheat-sheet/

Alternatives:

(GNU) screen (available in most *nix repositories)
abduco + dvtm (https://www.brain-dump.org/projects/)