ITeye博客

cmd 查看端口

ileson · 2011-04-27 12:11 · OS · 操作系统 · Markdown

1、Windows平台 在windows命令行窗口下执行:

C:\>netstat -ano|findstr "1025"

TCP    127.0.0.1:1025         0.0.0.0:0              LISTENING       944

端口被进程号为944的进程占用,继续执行下面命令:

C:\>tasklist |findstr "944"

alg.exe                     944 Console                 0     3,912 K

呵呵。alg占用了你的端口。

②:批处理方式


@echo off 
netstat -a -n > a.txt 
type a.txt | find "1433" && echo "系统已经开启指定的端口!" 
del a.txt 
pause & exit 

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。