High Performance Computing guides and policies for the University of Queensland.
tmux is a terminal multiplexer.
tmux enables a number of terminals to be created, accessed, and controlled from a single screen.
tmux may be detached from a screen and continue running in the background, then later reattached.
Scenario such as you need to leave something running in an interactive session launched from a login node.
But you need to go home and that means closing your laptop.
You could handle this by
tmux new -s NAMECtrl-B dtmux list-sessionstmux attach -t NAMECtrl-B : kill-session[uquser@bunya2 ~]$ tmux new -s Test12
#launched an interactive job
#set the while loop running in the interactive job
#detached using Ctrl-B d
[detached (from session Test12)]
#What did I call that tmux session ??!!
[uquser@bunya2 ~]$ tmux list-sessions
Test12: 1 windows (created Thu Oct 31 19:39:26 2024) [207x59]
#reattach to the terminal and I get back into the interactive batch job
[uquser@bunya2 ~]$ tmux attach -t Test12
#and I see more dots than I had before
[detached (from session Test12)]
[uquser@bunya2 ~]$
srun: ROUTE: split_hostlist: hl=bun048 tree_width 0
[uquser@bun048 ~]$ while [ 1 ]; do echo "."; sleep 15; done
.
.
[Test12] 0:srun* "bunya2.rcc.uq.edu.au" 19:41 31-Oct-24
For more info about tmux consult the manual page and online resources.