pgrep command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
pgrep: command not found
or when using sudo you get the following error message
sudo: pgrep: command not found
Solutions to pgrep: command not found
How To Fix pgrep: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu pgrep is provided by procps package.
procps is:
This package provides command line and full screen utilities for browsing procfs, a “pseudo” file system dynamically generated by the kernel to provide information about the status of entries in its process table (such as whether the process is running, stopped, or a “zombie”).
It contains free, kill, pkill, pgrep, pmap, ps, pwdx, skill, slabtop, snice, sysctl, tload, top, uptime, vmstat, w, and watch.
To fix this problem, we can install more using the command below.
sudo apt-get -y install procps
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install procps.
sudo apt -y install procps
Or if you have aptitude installed you can use the following command.
sudo aptitude install procps
Summary
In this tutorial we learn how to fix pgrep command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.