How to Run Linux Commands in Background and Detach in Terminal, so that you can close the Terminal

https://bit.ly/3mH31cY Terminal screen with outputs from commands

When a Linux process is associated with a terminal, two problems might occur:

  1. Your controlling terminal is filled with so much output data and error/diagnostic messages.
  2. In the event that the terminal is closed, the process together with its child processes will be terminated.

To deal with these two issues, you need to totally detach a process from a controlling terminal. The linked article does a good job of explaining how these processes are tied to the terminal, and also has a few examples demonstrating the issues as well as solutions like disown and nohup.

See https://www.tecmint.com/run-linux-command-process-in-background-detach-process/



source https://gadgeteer.co.za/how-to-run-linux-commands-in-background-and-detach-in-terminal-so-that-you-can-close-the-terminal/

Comments