Cloning a process is also called forking in Linux. For example, if you execute a command, such as the sleep command in the shell, a new process gets created identical to the parent Bash shell process in which the sleep command gets executed. Normally, the parent process, in our example the Bash shell process, waits until the child process has been finished. That is why you don't get an interactive cursor as long as your subprocess is running. This is the normal behavior for every command you run in the shell. If your Bash command-line prompt is blocked, this is also called running a foreground job. To kill this foreground job, press Ctrl + C. You can also influence this foreground behavior by setting the ampersand symbol at the end of any command. So, let's rerun the last command with the ampersand sign. When using the ampersand sign at the end of the command, the parent process does not wait until the child process finishes, but both processes now run in parallel. This is also referred to as running a process in the background. You'll notice that running a process in the background returns the process ID of the child process, so we can reference it later. For example, for killing it, use kill command. In order to put the last background job into the foreground, again type fg and press the Enter key. Now, our sleep command is back in the foreground. To put it back into the background, press Ctrl + Z. This does not put our process running in the foreground directly into the background, but rather suspends the process. To put a suspended process into the background type pg, or in the foreground type fg. In order to kill any suspended or background job, you can use the kill command. Our processes running in the background are also called jobs. In order to list all the jobs you currently have in your Terminal, you can use the jobs command. If you have any running jobs in the background, the output will be shown from which you can reference it using the number in the brackets. In order to address such a job ID, you need to prefix it with a percentage sign. For example, to kill the job with the job ID number 1, type kill %1. Note that theĀ pg, fg, and kill commands that we just used only work when you only have one single current background job in the Terminal. If you are working with multiple jobs in the current Terminal, you need to address them individually using the percentage sign.