windows系统中,

1,【查看端口占用pid】

netstat -nao|findstr port_number

eg,关闭端口占用程序

2.【使用上面得出的pid号,查看此指定端口的程序名,】

tasklist|findstr pid_number

eg,

关闭端口占用程序

3,【杀死指定端口进程】

taskkill /f /pid pid_number

关闭端口占用程序

 

【linux系统】

【一般情况下  netstat -nao|grep 389

ps -ef|grep svnserve

kill -9 pid】

我们在此来个小长命令搞定

 kill `netstat -ntlp|grep mysql|awk '{print $7}'|awk -F'/' '{print $1}'`

关闭端口占用程序

关闭端口占用程序

 

相关文章: