0
0

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.

ターミナルからポートを指定してマシン上で動作しているプロセスがLISTENしてるか調べる

Last updated at Posted at 2020-04-11

netstat を使う場合

$ netstat -an | grep 9000
tcp46      0      0  *.9000                 *.*                    LISTEN   

lsof を使う場合

$ lsof -i:9000 
COMMAND    PID        USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
??? 84196 guest    9u  IPv6 ???      0t0  TCP *:cslistener (LISTEN)

こちらではプロセスIDも取得できる。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?