LoginSignup
0
0

More than 5 years have passed since last update.

pgrepで特定のプロセスをkillしたいとき

Posted at

検索した際、stackoverflowのベストアンサーなどに少し翻弄されたので備忘録として

消したいプロセス名の取得を確認

pgrep -l python

# -lを省くとpidのみ表示される
11111 python3.6
22222 python3.6

killする

pkill -l python

# -lを省くとこの結果は表示されない
kill -15 11111
kill -15 22222

killされたか確認

pgrep -l python

結論

公式マニュアルを見よう

man pgrep
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0