The jobs command will list the running, stopped, foreground and background jobs or task running in the current session.


jobs [options]

The options are:

  • -l
  • Report the process group ID and working directory of the jobs.
  • -n
  • Display only jobs that have stopped or exited since last notified.
  • -p
  • Displays only the process IDs for the process group leaders of the selected jobs.
      run some jobs to see it in action:

      xterm &

      xterm &

      Now run


      This could be the output.
      [1]-  Running                 xterm &
      [2]+  Running                 xterm &