jobs command

The jobs command displays the status of jobs started in the current terminal window. Jobs are numbered starting from 1 for each session. The job ID numbers are used by some programs instead of PIDs (for example, by fg and bg commands).

Here is an example. We will start three programs (vim, find and dd) and suspend all of them. We will then use the jobs command to find out the job IDs of the programs. We can then use these IDs with the fg command to run the second job as a foreground process.

linux jobs command

Geek University 2022