I'm working on a problem on a remote server (I use ssh to connect). As I'm new to the domain, I'm using jupyter-notebook, so that I can examine and code. Some parts of my code take a long time to run(like maybe 4-5 hours) and I'm not able to maintain my connection that long. How can I keep my code running after the shell is closed? Should I just copy it into a .py file and use commands like tmux or screen?
Use screen.
$ screen
This will create a screen session and when you are done, you can use the keys ctrl-a-d to detach.
To go back:
$ screen -list
This will show the list of detached screen sessions. To connect
$ screen -r
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With