Tuesday, April 01, 2008

Move running process to background in Linux

Use the following sequence of keystrokes if you want to move a running process to background in Linux.



CTRL+Z will suspend the process and the command prompt will return to you. Type bg and press enter to send the process to background.

If you want to logout but keep the process running even after logging out then type disown -a. This will detach the process and it will continue to run even if you log out.

To start a process in detached mode, use nohup command.

nohup <command to start the process>

man nohup for more details.

No comments: