Before starting an interactive job you can create a detachable session with one of the terminal multiplexers that are installed in the cluster: tmux
and screen
.
We don’t have a wiki on how to use them, so you can Google to find a tutorial and go over these cheat sheets for tmux and screen.
Start a new named session with tmux:
tmux new -s <session-name>
Start a new named session with screen:
screen -S <session-name>
The <session-name> can be any string you select.
If you want you can also detach from a current session by pressing these key combinations:Ctrl+b
and d
for tmux or Ctrl+a
and d
for screen. You can then continue working in the original terminal session.
To return to the session to check on the progress, you can first list running sessions and then connect to one of them. For tmux this is done as follows:
tmux ls
tmux a -t <session-name>
or like this for screen:
screen -ls
screen -r <session-number>
Once you finish using the session for your work please make sure to kill the session:
In tmux: tmux kill-session -a -t <session-name>
And in screen: screen -X -S <session-name> kill