0

I have two pc on my home network. One of them is the Raspberry Pi. The Raspberry Pi has static IP. I connect with it, through my another pc, with ssh user@ip. But if I put a long process run I have to leave my pc power on.

How can I put long or short process run on my raspberry (or another machine with Linux) and shutdown the machine with I used to connect the raspberry?

muru
  • 207,228

1 Answers1

0

You can do this through screens...

  1. On the raspberry pi run the following commands to install Screen:

    sudo apt-get update

    sudo apt-get install screen

  2. Once it has installed simply type:

    screen

    followed by Enter

  3. Now run whatever long or short process you need..

  4. Now you simply have to "detach" the screen by pressing the following:

Ctrl+A

then d

Now you can disconnect from the raspberry pi and it will continue running in the background. If you want to "re-attach" to that screen, simply reconnect to the raspberry pi and type:

screen -r

If you need to do this again there is no need to reinstall screen so just start at step 2!

Good luck!