Keeping a process running after closing an ssh connection to a Linux computer

  • Connect to the Linux computer with ssh
  • Enter the command 'screen' and press enter
    • The screen shell will look very similar to your normal terminal shell
  • screen commands starts with pressing Ctr-a in the keyboard
    • 'Ctr-a c', create new window
    • 'Ctr-a Ctr-a', Switch to previous window
    • 'Ctr-a n', Switch to next window
    • 'Ctr-a p', Switch to previous window
    • 'Ctr-a #', # is the id of the window you want to move to
    • 'Ctr-a "', See the list of opened windows. Also you can select a window to move to.
    • 'Ctr-a A', to rename the current window. Will help later to remember the tasks in the windows
    • 'Ctr-a K', Kill program in current window
  • To detach your terminal from the process press 'Ctr-a d'. This will close the window, but the process still running. Also, if you close your terminal, all processes called from screen will still running.
  • To reattach left running processes, open a terminal and type 'screen -r'. Whaalllaaa!!! All your processes are still there.
  • For other commands inside screen, type 'Ctr-a ?'

Alumni Liaison

Ph.D. on Applied Mathematics in Aug 2007. Involved on applications of image super-resolution to electron microscopy

Francisco Blanco-Silva