摘要:
https://blog.csdn.net/rockage/article/details/127190263 阅读全文
摘要:
sh #!/bin/bash port=8080 # 将8080替换成你想要查找和杀死的端口号 # 查找端口的进程ID pid=$(lsof -ti :$port) # 杀死进程 if [[ -n "$pid" ]]; then echo "Killing process $pid listenin 阅读全文