LoginSignup
3
0

More than 5 years have passed since last update.

ポートを閉じる時に使うコマンド(lsofとkillコマンド)

Posted at

概要

PHPのビルトインサーバとかNode.jsでちょこっと作ったものを動かしたままTerminal閉じちゃった、とかの時に使うコマンドのメモ。
環境はMac。

コマンド

$ ~> lsof -i -P | grep 3000
node  10760  hoge  25u  IPv6 0xbcd2618d610bf4e3  0t0  TCP *:3000 (LISTEN)
$ ~> kill -9 10760

lsofでポート指定してプロセスを特定してkillすればOK

3
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
3
0