Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between foreground job and background job [closed]

In Linux, what is the difference between a foreground job and a background job?

like image 935
Yasser Souri Avatar asked Oct 11 '22 14:10

Yasser Souri


1 Answers

In a foreground job, all of your input is directed to the process's stdin (including the SIGINT that is generated when you press CTRL-C, and that's why you can still kill the process if it's in the foreground).

In a background job your input is directed to the shell process instead, and that is why you see the shell prompt and you can execute commands.

like image 171
aaronstacy Avatar answered Oct 14 '22 02:10

aaronstacy