命令 lsof -i tcp:port lsof -i tcp:port (port替換成端口號(hào),比如6379)可以查看該端口被什么程序占用,并顯示PID, 方便KILL kill -9 pid