linux 下查看进程占用端口: 查看程序对应的进程号: ps -ef | grep 进程名字 查看进程号所占用的端口号 linux: netstat -nltp | grep 进程号 ubuntu: netstat -anp | grep pid linux 下查看端口号所使用的进程号(使用 lsof 命令): lsof -i:端口号