查看5001段口被占用进程lsof -i:5001
:
1 2 3 4 5 6 7 8 9 10 11 12 13
| localhost:My$ lsof -i:5001
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
[Python](http://lib.csdn.net/base/python "Python知识库") 6320 zhaozeguang 3u IPv4 0x82d867c5ec4904d9 0t0 TCP localhost:51816->localhost:commplex-link (CLOSED)
[python](http://lib.csdn.net/base/python "Python知识库") 6323 zhaozeguang 3u IPv4 0x82d867c5ec4916e9 0t0 TCP localhost:51820->localhost:commplex-link (CLOSED)
Python 6327 zhaozeguang 3u IPv4 0x82d867c5ed8b52c9 0t0 TCP localhost:51828->localhost:commplex-link (CLOSED)
Python 6328 zhaozeguang 3u IPv4 0x82d867c5edcf04d9 0t0 TCP localhost:51835->localhost:commplex-link (CLOSED)
Python 6330 zhaozeguang 3u IPv4 0x82d867c5e27d06e9 0t0 TCP localhost:51836->localhost:commplex-link (CLOSED)
|
kill掉无用进程 kill PID
1
| localhost:My$ kill 6327 6328 6330
|
原文链接: http://yoursite.com/2018/10/31/mac查看端口占用进程以及强制清理进程/
版权声明: 转载请注明出处.