Foreground and background.
Jobs can either be in the foreground or in the background. There can only be one job in the foreground at a time. The foreground job is the job with which you interact—it receives input from the keyboard and sends output to your screen, unless, of course, you have redirected input or output. On the other hand, jobs in the background do not receive input from the terminal in general, they run along quietly without the need for interaction. Some jobs take a long time to finish and don't do anything interesting while they are running. Compiling programs is one such job, as is compressing a large file. There's no reason why you should sit around being bored while these jobs
complete their tasks; just run them in the background. While jobs run in the background, you are free to run other programs. Jobs may also be suspended. A suspended job is a job that is temporarily stopped. After you suspend a job, you can tell the job to continue in the foreground or the background as needed. Resuming a suspended job does not change the state of the job in any way—the job continues to run where it left off. Suspending a job is not equal to interrupting a job. When you interrupt a running process (by pressing the interrupt key, which is usually Ctrl-C), the process is killed, for good. Once the job is killed, there's no hope of resuming it. You'll must
run the command again. Also, some programs trap the interrupt, so that pressing Ctrl-C won't immediately kill the job. This is to let the program perform any necessary cleanup operations before exiting. In fact, some programs don't let you kill them with an interrupt at all.
Jobs can either be in the foreground or in the background. There can only be one job in the foreground at a time. The foreground job is the job with which you interact—it receives input from the keyboard and sends output to your screen, unless, of course, you have redirected input or output. On the other hand, jobs in the background do not receive input from the terminal in general, they run along quietly without the need for interaction. Some jobs take a long time to finish and don't do anything interesting while they are running. Compiling programs is one such job, as is compressing a large file. There's no reason why you should sit around being bored while these jobs
complete their tasks; just run them in the background. While jobs run in the background, you are free to run other programs. Jobs may also be suspended. A suspended job is a job that is temporarily stopped. After you suspend a job, you can tell the job to continue in the foreground or the background as needed. Resuming a suspended job does not change the state of the job in any way—the job continues to run where it left off. Suspending a job is not equal to interrupting a job. When you interrupt a running process (by pressing the interrupt key, which is usually Ctrl-C), the process is killed, for good. Once the job is killed, there's no hope of resuming it. You'll must
run the command again. Also, some programs trap the interrupt, so that pressing Ctrl-C won't immediately kill the job. This is to let the program perform any necessary cleanup operations before exiting. In fact, some programs don't let you kill them with an interrupt at all.