Putting a process to the background in Linux

Today i learned how one can detach a running process on linux or unix from the terminal. I know that you can do this on purpose by putting a ampersand: & behind the command. But that was not the question. You see i had a process running at 17:00 hours and it would take another hour before it was done. I wanted to go home before 18:00 yet i did not want to interrupt the process because it should finish. So CTRL-C was not an option.
But you can tell linux to detach the process from the terminal, you just do this simple steps

  • CTRL-Z (no this will not harm the process)
  • bg n

Where n is the job number that linux returns after you hit CTRL-Z. Linux will continue the process in the background (bg) and you can close the terminal session.


Of course you should run screen in all of your (remote) terminal sessions, so that you can detah, attach, yes, even lose the connection and later log back on and continue where you have left or simply find your process has finished.

Type 'screen -R' to pick up an old screen or automatically start a new one, and for the rest it's 'man screen' :)

previous item: Angels Of Light – Intermission next item: twitter update
thank you for watching  Creative Commons License