• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

jobs: command not found

by Deepika

The “jobs” command is a built-in command of the BASH shell (and other shells like ZSH and KSH) that allows you to view information about the processes that have been spawned by the current shell. When you run a command in the shell, that command is executed as a separate process. The jobs command allows you to view a list of all the processes that have been started by the current shell, along with their current status.

Some common options and usage of the “jobs” command include:

jobs: By simply running the command “jobs” without any options, it will display a list of all the jobs currently running or stopped in the background and the current status of each job.

  • jobs -l: This option will display the process ID (PID) of each job in the list, in addition to the other information.
  • jobs -p: This option will display only the process IDs of the jobs in the list, and not the other information.
  • jobs -n: This option will display only the jobs that have changed status since the last time the jobs command was run.
  • jobs -r: This option will display only the running jobs in the list.
  • jobs -s: This option will display only the stopped jobs in the list.

You can also use the command fg % to bring a background job to the foreground, or bg % to continue running a stopped job in the background.

If you encounter the below error while running the command jobs:

jobs: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install bash
Ubuntu apt-get install bash
Alpine apk add bash
Arch Linux pacman -S bash
Kali Linux apt-get install bash
CentOS yum install bash
Fedora dnf install bash
OS X brew install bash
Raspbian apt-get install bash

jobs Command Examples

1. Show status of all jobs:

# jobs

2. Show status of a particular job:

# jobs %job_id

3. Show status and process IDs of all jobs:

# jobs -l

4. Show process IDs of all jobs:

# jobs -p

5. Display running processes:

# jobs -r

6. Display stopped processes:

# jobs -s

Filed Under: Linux

Some more articles you might also be interested in …

  1. quotaoff Command Examples in Linux
  2. What is the purpose of “mysql.sys@localhost” user
  3. fprintd-enroll: command not found
  4. atop Command Examples in Linux
  5. pacstall Command Examples
  6. CentOS / RHEL : How to change the UUID of the filesystem
  7. CentOS / RHEL : How to install a specific version of rpm package using YUM
  8. Filesystems Are Not Getting Mounted in Order on CentOS/RHEL 7
  9. How to Kill VNC Window Sessions in Linux
  10. extundelete Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright