This is almost too simple for a whole wiki page, but snippets that maybe useful in emergency situations deserve a clazzes.org page by definition ...
Some tasks run too long for one "office chair session". Some other tasks require a lot of shell environment preparation.
In both situations a long-lived shell that can be accessed from different client machines can be very useful.
tmux provides such a shell.
The following examples assume that the detachable shell shall run on a remote machine.
Obviously, tmux has to be installed:
Creating a detachable shell
Ctrl-b d, i.e. press and hold
Frequently used hotkeys
To enter scrolling press
Ctrl-b [. Now cursor up/down and page up/down allow arbitrary scrolling. To quit scrolling, press
q (for quit).
Frequently used options
|-L socket-name||Uses specified socket-name instead of 'default'. Useful to run and distinct multiple tmux daemons.|
|-S socket-path||Uses specified socket-path instead of default path and name. Useful to run and distinct multiple tmux daemons.|
Further features and reading
tmux can do much more, i.e. run multiple commands (i.e. shells) and so on.
Just read the tmux(1) manpage, especially chapters KEY BINDINGS, COMMANDS, and below.