pidof

Find the process ID number of the process with the specified name

Supplementary instructions

pidof command is used to find the process ID number of the process with the specified name.

grammar

pidof(option)(parameter)

Options

-s: only returns a process number;
-c: Only show processes with the same "root" directory;
-x: Display processes started by scripts;
-o: Specify the process ID not to be displayed.

Parameters

Process name: Specify the name of the process to find.

Example

pidof nginx
13312 5371

pidof crond
1509

pidof init
1
继续阅读

接下来你可能需要这些内容

优先推荐相关内容,同时保留你的阅读轨迹和收藏入口。