Linux命令:pidof

查找指定名称的进程的进程号ID号

2024-12-31 17:38:49

命令行command

补充说明

pidof命令 用于查找指定名称的进程的进程号id号。

语法

pidof(选项)(参数)

选项

-s:仅返回一个进程号;
-c:仅显示具有相同“root”目录的进程;
-x:显示由脚本开启的进程;
-o:指定不显示的进程ID。

参数

进程名称:指定要查找的进程名称。

实例

pidof nginx
13312 5371

pidof crond
1509

pidof init
1

评论

静谧以待,您的评论将是点睛之笔

撰写首个评论,启程你的前端奇妙之旅

is a Wiki for programming enthusiasts and professionals, organizing knowledge on programming.

Connect With Me

I have a fair amount of knowledge of Javascript, Typescript, VueJs, and Nuxt. If you have an interesting idea, either open source or paid let's connect.

Sent Mail
© 2024-2025 © . All rights reserved.