查找占用 3000 端口的进程 PID

lsof -ti:3000
 
# OUT: 99740

查看进程详情

ps -p 99740 -o pid,ppid,command

杀进程

# -9 - 信号编号,代表 SIGKILL 信号,强制终止
kill -9 99740