How to move a running process to background (UNIX) How to move a running process to background (UNIX) unix unix

How to move a running process to background (UNIX)


Press control + Z, which will pause it and send it to the background. Then enter bg to continue it's running in the background.

Alternatively, if you put a & at the end of the command to run it in the background from the start.

This will just make it run in the background and once you log out it will still be killed. In order to keep it running after logout you will need to "disown" the process with disown -h, so that the shell doesn't count it among your processes needing to be killed on logout. See this post for more details.


You can as well use the "screen" command which will keep running with processes inside it once you have detached from it.