jobs

jobs is used to display the status of jobs that are currently running in the background or suspended. When you run a command in a terminal, it may continue to run even after you close the terminal window or switch to another terminal window. Such commands are known as background jobs.

Basic Syntax

jobs [options]

Commonly Used Options

  • -l: This option displays the process IDs (PIDs) of the background jobs.
  • -p: This option displays only the PIDs of the background jobs.
  • -n: This option displays only the jobs that have changed status since the last notification.
  • -r: This option displays only the running jobs.
  • -s: This option displays only the stopped jobs.
  • -x: This option displays only the jobs that have been started in the current shell session.

Useful Examples

  • jobs: This displays a list of all background jobs currently running in the shell.
  • jobs -l: This displays a list of all background jobs along with their process IDs.

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments

  1. […] Once installed, let’s first allow TCP traffic over your SSH port so that you don’t get locked out of…

  2. […] have the option to choose between Password and SSH key selection. Learn more about SSH keys here. It’s recommended…