Screen could be used as nohup with the additional possibility of attaching to the terminal session again, once your ssh session was aborted (or equivalent).

  • screen- Create a new screen
  • screen -S name- Create a new screen named "name"
  • screen -ls- List screens
  • screen -D- Detach from screen
  • screen -r- Attach to the single existing screen
  • screen -r 4262- Attach to the detached screen with pid 4262
  • screen -x 4262- Reattach to the attached screen with pid 4262
  • ctrl+a c - Create a new terminal in the current screen
  • ctrl+a H - Log all output of current screen to a log file
  • ctrl+a space - Change terminals within current screen
  • ctrl+a :sessionname name - Rename current screen to "name"
  • ctrl+a d - Detach from current screen, like exit but keeps the terminal for reattaching later on