pgrep is a command-line utility initially written for use with the Solaris 7
Solaris Operating System
Solaris is a Unix operating system originally developed by Sun Microsystems. It superseded their earlier SunOS in 1993. Oracle Solaris, as it is now known, has been owned by Oracle Corporation since Oracle's acquisition of Sun in January 2010....
operating system. It has since been reimplemented for Linux
Linux
Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
DragonFly BSD is a free Unix-like operating system created as a fork of FreeBSD 4.8. Matthew Dillon, an Amiga developer in the late 1980s and early 1990s and a FreeBSD developer between 1994 and 2003, began work on DragonFly BSD in June 2003 and announced it on the FreeBSD mailing lists on July...
FreeBSD is a free Unix-like operating system descended from AT&T UNIX via BSD UNIX. Although for legal reasons FreeBSD cannot be called “UNIX”, as the direct descendant of BSD UNIX , FreeBSD’s internals and system APIs are UNIX-compliant...
NetBSD is a freely available open source version of the Berkeley Software Distribution Unix operating system. It was the second open source BSD descendant to be formally released, after 386BSD, and continues to be actively developed. The NetBSD project is primarily focused on high quality design,...
OpenBSD is a Unix-like computer operating system descended from Berkeley Software Distribution , a Unix derivative developed at the University of California, Berkeley. It was forked from NetBSD by project leader Theo de Raadt in late 1995...
In computing, a process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system , a process may be made up of multiple threads of execution that execute instructions concurrently.A computer program is a...
In computing, a regular expression provides a concise and flexible means for "matching" strings of text, such as particular characters, words, or patterns of characters. Abbreviations for "regular expression" include "regex" and "regexp"...
-Medicine:*Prolapsed intervertebral disc, commonly called a "herniated disc"*Primary immune deficiency, disorders in which part of the body's immune system is missing or does not function properly...
pidof is a Linux utility that returns the process identifier of a running process or processes. On other operating systems, pgrep and ps are often used instead....
In most Unix-like operating systems, the ps program displays the currently-running processes. A related Unix utility named top provides a real-time view of the running processes....
Additional functionality of pgrep is listing the process name as well as the PID (-l Lists the process name as well as the process ID) of all processes belonging to the group alice (-G Only match processes whose real group ID is listed. Either the numerical or symbolical value may be used):
pgrep -l -G alice
showing all processes that do not belong to the user root
Superuser
On many computer operating systems, the superuser is a special user account used for system administration. Depending on the operating system, the actual name of this account might be: root, administrator or supervisor....
(-u euid Only match processes whose effective user ID is listed. Either the numerical or symbolical value may be used) by inverting the matching (-v Negates the matching):
pgrep -v -u root
and only matching the most recently started process (-n Select only the newest (most recently started) of the matching processes):
The most recent process started
pgrep -n
The most recent `emacs` process started by user `alice`
pidof is a Linux utility that returns the process identifier of a running process or processes. On other operating systems, pgrep and ps are often used instead....
pkill is a command-line utility initially written for use with the Solaris 7 operating system. It has since been reimplemented for Linux and some BSDs.As with the kill and killall commands, pkill is used to send signals to processes...
– signal processes based on name and other attributes
In most Unix-like operating systems, the ps program displays the currently-running processes. A related Unix utility named top provides a real-time view of the running processes....