在Mac如何在终端中找到被占用的端口的应用然后杀掉它? 找到该端口的PID号: sudo lsof -i :8020 (我需要找到的是8020端口) 利用PID号直接杀掉应用: sudo kill -9 24491 (8020的PID号就是24491啊)