debian8系統(tǒng)如何用pidof命令查找指定進(jìn)程的id號(hào)?本教程以debian8系統(tǒng)為例
本配置適用于debian8,9版本
1.pidof命令用于查找指定名稱的進(jìn)程的進(jìn)程號(hào)id號(hào)。
2.語(yǔ)法
3.pidof(選項(xiàng))(參數(shù))
選項(xiàng)
-s:僅返回一個(gè)進(jìn)程號(hào);
-c:僅顯示具有相同“root”目錄的進(jìn)程;
-x:顯示由腳本開啟的進(jìn)程;
-o:指定不顯示的進(jìn)程ID。
4.實(shí)例
pidof 指定要查找的進(jìn)程名稱。
pidof init
pidof exim4