Last updated
Last updated
"tmux is a for . It allows multiple sessions to be accessed simultaneously in a single window. It is useful for running more than one program at the same time. It can also be used to detach from their controlling terminals, allowing sessions to remain active without being visible." - Wikipedia
In other words, tmux allows you to start a session to run your job and then exit the terminal window without killing your process.
This will create (and open) a new tmux session with the given name. In the session, you can then run your job the way you normally would over ssh.
Detaching the session allows you to close your ssh connection (and then close the terminal) without killing the process running in the tmux session.
The session can be detached by clicking control-b and then typing a d.
After sshing back into the remote server, to "re-open" or attach a tmux session, use the following command. This can be used to see if your process finished running and/or the output of the process.
After your process finishes running in the tmux session, you can then kill it off with the following work.
This will close off any process running in the session, so make sure that your job is done.
How and why you should use tmux to run your jobs.