Appearance
Normally when you close a terminal, including a Dataplicity terminal, your script will terminate too.
But what if you wanted to keep your scripts running even if you leave the terminal?
Enter tmux.
Firstly, install tmux:
shell
sudo apt install -y tmuxThen make a tmux session that you will use:
shell
tmux new -s MySessionWhen you create a new session you will automatically get attached to it.
All done! You are now within a tmux environment that you can leave and log back into whenever you want to. The scripts that you launch within this environment will stay alive until you turn them off.
Session commands
To detach from a session use:
shell
tmux detachTo re-attach to a session use:
shell
tmux a -t MySessionTo delete a session completly use:
shell
tmux kill-session -t MySession