How to send jobs to background without stopping them?

Solution 1:

you can run "bg" to run it in the background.

"fg" moves it to the foreground

Note that bg and fg take job #s instead of PIDs, so if you've got multiple jobs running at once, use the "jobs" command to get the job numbers.

Solution 2:

you can also start a program as a background job with an "&" on the command line.

e.g.

myprogram &

note that output (both stdout and stderr) will still go to the current tty, so it's generally a good idea to redirect to /dev/null or to a log file, like so:

myprogram > ~/program.log 2>&1 &

in either example, it's a background job like any other, so you can still bring it back to the foreground with 'fg' (but if you've redirected output you won't see much).