location: Diff for "tmux"

Institute of Mathematics - PublicMathWiki:

Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2025-02-04 13:31:40
Size: 1048
Editor: crose
Comment:
Revision 3 as of 2025-02-04 13:38:34
Size: 1246
Editor: crose
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Describe tmux here.
Line 7: Line 5:
== Session ==
Line 9: Line 9:
   * type '''tmux -s <session name>''' . F.e.: `tmux -s my-session`    * type `tmux -s <session name>` . F.e.: `tmux -s my-session`
Line 13: Line 13:
   * to detach from screen ("send it to background"), press '''Ctrl + b d '''    * to detach from screen ("send it to background"), press `Ctrl + b d`
Line 18: Line 18:
   * use '''tmux attach -t <session name>''' to connect to your task. F.e. '''tmux attach -t my-session'''    * use `tmux attach -t <session name>` to connect to your task. F.e. `tmux attach -t my-session`

 * List session: `tmux ls`

== Screen splitting ==

 * Split Horizontally: Press Ctrl+b then " - This creates a new pane below the current one.
 * Split Vertically: Press Ctrl+b then %
 * Close open pane: Ctrl+d

tmux

tmux is a useful tool to keep long time tasks (a.e. magma, matlab) running on a computer without keeping your session online during the whole computation:

Session

  • Initial Start:
    • open a console and connect through SSH to the machine you want to run the task on (most likely: compute.math.uzh.ch) by typing the host name: [user@tlX] compute and enter your password (there is a script called 'compute' which does nothing else than 'ssh compute' - in our evironment it's not necessary to type 'ssh compute')

    • type tmux -s <session name> . F.e.: tmux -s my-session

  • Detach:
    • to detach from screen ("send it to background"), press Ctrl + b  d

    • you now can log off from the terminal and your task will keep running
  • Attach again:
    • if you want to check progress of your computations, log into the machine where your task is running like you did before
    • use tmux attach -t <session name> to connect to your task. F.e. tmux attach -t my-session

  • List session: tmux ls

Screen splitting

  • Split Horizontally: Press Ctrl+b then " - This creates a new pane below the current one.
  • Split Vertically: Press Ctrl+b then %
  • Close open pane: Ctrl+d

PublicMathWiki: tmux (last edited 2025-03-22 13:05:26 by crose)