For example lets say I was in the middle of running a script I want to be able to keep the ssh session alive so I continue where I left off.

| improve this question | | | | |
  • 1
    See tmux or screen commands. – Brick Sep 5 '19 at 16:59

You can use the screen (or tmux, but I'm not familiar with it) terminal multiplexer. First install it with sudo apt install screen. Then just start it with screen. You will get a normal terminal with a command line. You can start programs there as usual but you are able to detach from the screen terminal with Ctrla+d. This will leave the screen terminal but a program that was started in screen is still running. If you want to reattach to the running program execute:

rpi ~$ screen -r

Within screen you can get help with Ctrla+? or look at man screen.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.