0

I’m running a raspberry pi 3b headless, thus I ssh into rpi from Mac terminal through Ethernet cable ip.

I’m currently installing opencv but the terminal kinda not giving any response. If I close the terminal, will it stop the installation process as well?

1
  • 1
    Yes - unless you detach the process.
    – Milliways
    Commented Jan 24, 2021 at 21:44

2 Answers 2

3

Any program started in the foreground within the ssh session will terminate when closing the ssh session. You have to ensure to send the program to the background before closing the session. have a look at the command nohup (man nohup). You can also use screen within the session. This looks like a normal ssh console and you can run programs. But you can detach from screen and it is still running in the background without stopping running programs in it. To detach use Ctrl+D.

1

The moment a network terminal becomes unresponsive it's usually already disconnected on the other end, so you're not installing anything anymore. Closing the disconnected terminal window will then have no effect.

Note that interrupting an installation like that may lead to problems, especially when updating system packages such as the kernel. You should try to re-connect and restart the installation before you attempt to reboot the Pi, since it may not be able to boot with a partial update. Always use a terminal multiplexer (such as tmux or screen) when working over a network.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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