2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Windowsで特定のポートを使用しているプロセスを停止する方法

Last updated at Posted at 2017-12-03

特定のポートを使用しているプロセスを探し、強制終了する

手順

  1. netstatで対象プロセスのPIDを取得
  2. taskkillで対象プロセスを終了させる
使用するコマンド
netstat -aon | find "[探したいポート番号]"
taskkill /f /pid [終了させたいPID]
実行例
8080番ポートを使用しているプロセスを終了させる場合

netstat -aon | find "8080"
TCP         0.0.0.0:8080           0.0.0.0:0              LISTENING       12104
TCP         [::]:8080              [::]:0                 LISTENING       12104

ここでは12104がPIDとなっているので、続けてtaskkillする

taskkill /f /pid 12104
成功: PID 12104 のプロセスは強制終了されました。
2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?