Skip to main content

Screen - Run an terminal in the background and if you lose connectivity it still runs

Screen is a utility that lets you run an application/script/terminal and then place it in the background so you can come back to it later.  If you were to lose your network connection to your SSH terminal then you can go back to where you were.

  1. run "screen"
  2. You are now in the first screen.  Run whatever you need to run and press CTRL-A then D to detach.
  3. You have now dethatched from your terminal.  If you want to return to that terminal all you do is type screen -r (return

If you have multiple screens launched you just return to the proper screen.  It will list them for you automatically like so...

nodeadmin@Constellation-Node:/scripts$ screen -r
There are screens on:
        832022.pts-0.meeseeks   (05/27/2025 03:45:36 AM)        (Attached)
        831693.pts-0.meeseeks   (05/27/2025 03:42:36 AM)        (Attached)

 screen -r 831693.pts-0.meeseeks

Now you can launch your process in screen, detach, put your computer to sleep/power off and come back later.