Is it possible to detach a process from its terminal? (Or, “I should have used screen!”) [duplicate]

You can press ctrl-z to interrupt the process and then run bg to make it run in the background.

You can show a numbered list all processes backgrounded in this manner with jobs.

Then you can run disown %1 (replace 1 with the process number output by jobs) to detach the process from the terminal.

In spite of the name, the process will still be owned by you after running disown, it will just be detached from the terminal you started it in.

This answer has more information

Leave a Comment