Create, Stop and Terminate Jobs
![Managing Job Life Cycle](/_next/image/?url=https%3A%2F%2Fstatic.d-libro.com%2F01-course-content-images%2F2011-10-Linux-Introduction%2F010-main-figures%2Fcreate-stop-and-terminate-jobs-id201110080510.webp&w=1920&q=75)
The illustration describes a life cycle of a job. Here is a summary explanation of the life cycle.
Create job
- When you run a command without
&
, the command will run as a foreground job. - When you run a command with
&
, the command will run as a background job.
Stop job
- You can stop (suspend) a job with Ctrl + Z
Terminate jobs
- To terminate a running foreground job, you can use Ctrl + C
- To terminate a background job or a stopped foreground job, you can use the kill command with the process ID or
%
job ID.