LoginSignup
98
84

More than 5 years have passed since last update.

特定のポート番号をListenしてるプロセスを特定する。

Posted at

Macの場合

netstat 単体ではポート番号をListenしているプロセスIDまでは特定できないので、lsof を使う。

lsof -n -P -i :{portnumber}

-i : ポート番号を指定する(IPアドレスにも対応してる?)
-P : ポート名を使用しない(ポート番号で表記する)
-n : ホスト名を使用しない(IPアドレスで表記する)

98
84
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
98
84