System and processes

The jobs command

Lists the jobs launched in the background from this terminal, with their number and state.

Syntax

jobs

Most useful options

&At the end of a command, runs it in the background
Ctrl+ZSuspends the foreground command

Copy-ready examples

$ sleep 100 &Launch it in the background
$ jobsSee this terminal's jobs

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • jobs only sees this terminal's jobs, not other tabs' ones.
  • Closing the terminal loses the jobs; to keep them, use nohup.

Related commands

FAQ

What do + and - mean?

+ is the current job (the one fg uses with no number) and - the previous one.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course