Forrest logo
back to the jobs tool

jobs:tldr:27a06

jobs: Show status of all jobs.
$ jobs
try on your machine

The command "jobs" is a built-in command in Unix-like operating systems that displays a list of the current jobs or processes running in the background.

When you execute multiple commands or run processes in the background using the '&' symbol, they become separate jobs. The "jobs" command allows you to see information about these background jobs, such as their job ID, status, and command.

Here are some common options that can be used with the "jobs" command:

  • "jobs -l": displays additional information about each job, including the process ID (PID).
  • "jobs -p": only displays the process IDs of the jobs.
  • "jobs -n": only displays the jobs that have been notified or changed status since the last "jobs" command.

The output of the "jobs" command typically includes:

  • Job ID: A number assigned to each job.
  • Job status: Indicates if the job is running, stopped, or terminated.
    • Running: The job is currently executing.
    • Stopped: The job has been paused or suspended.
    • Terminated: The job has completed or was terminated.
  • Command: The command or script that started the job.

The "jobs" command is useful when you have multiple background processes running and you want to check their status or manage them by bringing them to the foreground, suspending, or terminating them.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the jobs tool