Start longer running Jobs with screen

On the command line if you close a console with a running job, you kill the job. This is different with the tool ‘screen’, where you can attach and detach from a ‘screen’ without terminating it. You can even start a job in a screen on another machine, detatch, travel somewhere else and re-attach to it on another machine.

If you do not have screen yet, install it on your Debian box with: apt-get install screen

Commands:

  • screen -S indexing – Create a screen with name ‘indexing’.
  • screen -ls – Show available screens.
  • screen -r indexing – Re-attach to the screen ‘indexing’.
  • Strg-A, Strg-D – Detatch from a current screen (without terminating it).
  • exit OR Strg-D – Exit from a current screen. This terminates the screen session.