To run a process in the background, we normally use
$ command &
What if we accidentally start a process in the foreground instead of starting it in the background? No problem. Just do a
CTRL+Z
and the process will jump to the background. Note that pressing a
CTRL+Z
will move the process to the background and suspend it. In order for it to keep executing, you need to do a
CTRL+Z
and then type
bg
to keep it running the background. Now, you can type
jobs
to see the list of processes running the background. To bring a particular job to the foreground, type
fg