LoginSignup
2
1

More than 5 years have passed since last update.

指定されているポートが使ってるプロセスを強制終了するコマンド

Posted at

開発用のブランチが複数あって行き来してて、ローカルサーバを立ててるとたまにポートがかぶってて怒られる時がある。そのときに使う。

例:3000のポートを使っているタスクを切る
kill $(lsof -t -i:3000)

  • lsof -t -i:3000 ポートを使用しているプロセスを見る
  • killで使用しているプロセスを終了する
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