macOS 查看监听指定端口的进程(Linux 等价 netstat -ntlp)

lsof -n -i4TCP:$PORT | grep LISTEN
lsof -n -iTCP:$PORT | grep LISTEN
lsof -n -i:$PORT | grep LISTEN

其中$PORT替换为指定的端口号,或者是用英文逗号连接的一组端口号。

from

donate to me

0 Comments

No comments yet.

Leave a Reply