推荐阅读
# 此处的 {PORT} 指你需要查看的端口号
lsof -t -i:{PORT}
# 示例
lsof -t -i:3000
# kill -15 让进程正常退出
kill -15 {PID}
# kill -9 表示强制中断, 不推荐使用, 只有当进程发生异常, 自身无法正常退出时, 才使用
kill -9 {PID}
kill -15 `lsof -t -i:{PORT}`
假定命令名是 next-render-worker-xxx
kill -15 $(ps aux | grep '[n]ext-render-worker-' | awk '{print $2}')
版权声明: 自由转载-非商用-非衍生-保持署名 (创意共享 3.0 许可证)