Linux common commands-31: pgrep

The pgrep command is to retrieve running processes, showing matching process ID .

Syntax format: pgrep [parameter] [mode]

Common parameters:

Example

 # 显示bash进程的pid pgrep bash

 # 多用户系统中,还可以指定用户再次过滤pgrep -u root bash

This article is reprinted from https://xugaoxiang.com/2022/06/10/linux-cmds-31-pgrep/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment