找出Window/Linux下 占用端口的进程

Windows

使用命令:

netstat -ano|find " :端口号"|find "LISTEN"

任务管理查找ip

 Windows上根据进程名 杀死进程,如下命令:

taskkill /F /IM hugo.exe

 Windows上根据进程ID 杀死进程,如下命令:

taskkill /F /PID 3306

Linux

命令如下:

netstat -anp|grep ":3306" |grep LISTEN

原文地址:https://www.cnblogs.com/sunzzc/p/13192322.html