#!/bin/bash # 查找并杀死监听端口 8000 的进程 PID=$(ps aux | grep 'manage.py runserver 0.0.0.0:8084' | grep -v grep | awk '{print $2}') if [ -z "$PID" ]; then echo "No process found running on port 8084." else kill -9 $PID echo "Process $PID killed." fi