YC Yc.W home Systems · C++ · AI Infrastructure
Systems · Note

Linux-端口占用

Explore all Systems notes →

当Linux应用程序提示端口被占用,解决方案是先查询端口占用进程的pid,然后kill pid。

  • netstat -tlnap |grep port
  • lsof -i:port查看端口占用的进程

kill -9 pid kill占用端口的进程