jobs

jobs is used to list all active or suspended jobs. jobs will commonly be used with the fg and bg commands.

$ jobs
list of jobs in form
[jobID]		status		jobs

Useful Options / Examples

jobs -l

$ jobs -l
[1]		14891	Running		firefox &
[2]+	14900	Stopped		sleep 10s
[3]-	14912	Running		sleep 20s &
Description
$ jobs -l
[1]		14891	Running		firefox &
[2]+	14900	Stopped		sleep 10s
[3]-	14912	Running		sleep 20s &
 |        |        |            |
 \- jobID |        |            |
          \- PID   |            |
                   \- status    |
                                \-job

jobs -r

$ jobs -l
[1]		Running		firefox &
[3]-	Running		sleep 20s &
Description
  • the -r flag tells jobs to limit the list to running jobs

jobs -s

$ jobs -s
[2]+	14900	Stopped		sleep 10s
Description
  • the -s flag tells jobs to limit the list to stopped jobs