Find processes by name or pattern
$ pgrep -l gnome
1612 gnome-session
1675 gnome-keyring-d
1681 gnome-settings-
1709 gnome-panel
1711 gnome-power-man
1716 polkit-gnome-au
1720 gnome-terminal
1824 gnome-pty-helpe
1865 gnome-screensav
-l
: option to list the process name
Find processes by name or pattern and list information about
them using ps
$ pgrep gnome | xargs ps
PID TTY STAT TIME COMMAND
1612 ? Ssl 0:00 gnome-session --session=classic-gnome
1675 ? SLl 0:10 /usr/bin/gnome-keyring-daemon --start --components=pkcs11
1681 ? Ssl 0:10 /usr/lib/gnome-settings-daemon/gnome-settings-daemon
1709 ? Sl 0:06 gnome-panel
1711 ? Sl 0:00 gnome-power-manager
1716 ? Sl 0:00 /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
1720 ? Sl 0:02 gnome-terminal
1824 ? S 0:00 gnome-pty-helper
1865 ? Ss 0:00 gnome-screensaver