Mores
# 后端与运维

查看端口被哪个进程占用

端口被占用、服务起不来时,可以这样查:

Linux:ss -lntp | grep :3000

macOS:lsof -i :3000

Windows:netstat -ano | findstr :3000,再按最后一列的 PID 在任务管理器里找到进程。