16
12

More than 5 years have passed since last update.

[TIPS]Windowsで、あるポート番号をListenしているプロセスを調べてkillする

Posted at

あるポート番号をListenしているプロセスを調べる

  1. netstatコマンドで一覧取得する
  2. findで絞り込む(grepのような機能)


ポート番号 8080 をListenしているプロセス(PID)を調べる


>netstat -ano | find ":8080"
  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       8220
  TCP    [::]:8080              [::]:0                 LISTENING       8220

上の8220 がプロセスID(PID)となる

該当のプロセスをkillする


PIDが 8220 のプロセスを killする

>taskkill /F /PID 8220
成功: PID 8220 のプロセスは強制終了されました。
16
12
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
16
12